summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-04-11rebase --merge: optionally skip upstreamed commitsLibravatar Jonathan Tan5-4/+110
When rebasing against an upstream that has had many commits since the original branch was created: O -- O -- ... -- O -- O (upstream) \ -- O (my-dev-branch) it must read the contents of every novel upstream commit, in addition to the tip of the upstream and the merge base, because "git rebase" attempts to exclude commits that are duplicates of upstream ones. This can be a significant performance hit, especially in a partial clone, wherein a read of an object may end up being a fetch. Add a flag to "git rebase" to allow suppression of this feature. This flag only works when using the "merge" backend. This flag changes the behavior of sequencer_make_script(), called from do_interactive_rebase() <- run_rebase_interactive() <- run_specific_rebase() <- cmd_rebase(). With this flag, limit_list() (indirectly called from sequencer_make_script() through prepare_revision_walk()) will no longer call cherry_pick_list(), and thus PATCHSAME is no longer set. Refraining from setting PATCHSAME both means that the intermediate commits in upstream are no longer read (as shown by the test) and means that no PATCHSAME-caused skipping of commits is done by sequencer_make_script(), either directly or through make_script_with_merges(). Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-11rebase: fix an incompatible-options error messageLibravatar Elijah Newren1-1/+1
When the user specifies the apply backend with options that only work with the merge backend, such as git rebase --apply --exec /bin/true HEAD~3 the error message has always been fatal: --exec requires an interactive rebase This error message is misleading and was one of the reasons we renamed the interactive backend to the merge backend. Update the error message to state that these options merely require use of the merge backend. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-11rebase: reinstate --no-keep-emptyLibravatar Elijah Newren6-30/+87
Commit d48e5e21da ("rebase (interactive-backend): make --keep-empty the default", 2020-02-15) turned --keep-empty (for keeping commits which start empty) into the default. The logic underpinning that commit was: 1) 'git commit' errors out on the creation of empty commits without an override flag 2) Once someone determines that the override is worthwhile, it's annoying and/or harmful to required them to take extra steps in order to keep such commits around (and to repeat such steps with every rebase). While the logic on which the decision was made is sound, the result was a bit of an overcorrection. Instead of jumping to having --keep-empty being the default, it jumped to making --keep-empty the only available behavior. There was a simple workaround, though, which was thought to be good enough at the time. People could still drop commits which started empty the same way the could drop any commits: by firing up an interactive rebase and picking out the commits they didn't want from the list. However, there are cases where external tools might create enough empty commits that picking all of them out is painful. As such, having a flag to automatically remove start-empty commits may be beneficial. Provide users a way to drop commits which start empty using a flag that existed for years: --no-keep-empty. Interpret --keep-empty as countermanding any previous --no-keep-empty, but otherwise leaving --keep-empty as the default. This might lead to some slight weirdness since commands like git rebase --empty=drop --keep-empty git rebase --empty=keep --no-keep-empty look really weird despite making perfect sense (the first will drop commits which become empty, but keep commits that started empty; the second will keep commits which become empty, but drop commits which started empty). However, --no-keep-empty was named years ago and we are predominantly keeping it for backward compatibility; also we suspect it will only be used rarely since folks already have a simple way to drop commits they don't want with an interactive rebase. Reported-by: Bryan Turner <bturner@atlassian.com> Reported-by: Sami Boukortt <sami@boukortt.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-04-11rebase -i: mark commits that begin empty in todo editorLibravatar Elijah Newren2-1/+7
While many users who intentionally create empty commits do not want them thrown away by a rebase, there are third-party tools that generate empty commits that a user might not want. In the past, users have used rebase to get rid of such commits (a side-effect of the fact that the --apply backend is not currently capable of keeping them). While such users could fire up an interactive rebase and just remove the lines corresponding to empty commits, that might be difficult if the third-party tool generates many of them. Simplify this task for users by marking such lines with a suffix of " # empty" in the todo list. Suggested-by: Sami Boukortt <sami@boukortt.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-22Git 2.26Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-21Merge branch 'en/rebase-backend'Libravatar Junio C Hamano1-1/+1
Test fix. * en/rebase-backend: t3419: prevent failure when run with EXPENSIVE
2020-03-21Merge tag 'l10n-2.26.0-rnd2.1' of git://github.com/git-l10n/git-po.gitLibravatar Junio C Hamano13-26190/+53932
l10n-2.26.0-rnd2.1 * tag 'l10n-2.26.0-rnd2.1' of https://github.com/git-l10n/git-po: (28 commits) l10n: tr.po: change file mode to 644 l10n: de.po: Update German translation for Git 2.26.0 l10n: de.po: add missing space l10n: tr: Fix a couple of ambiguities l10n: Update Catalan translation l10n: sv.po: Update Swedish translation (4839t0f0u) l10n: zh_CN: Revise v2.26.0 translation l10n: zh_CN: for git v2.26.0 l10n round 1 and 2 l10n: vi(4839t): Updated Vietnamese translation for v2.26.0 l10n: vi: fix translation + grammar l10n: zh_TW.po: v2.26.0 round 2 (0 untranslated) l10n: zh_TW.po: v2.26.0 round 1 (11 untranslated) l10n: it.po: update the Italian translation for Git 2.26.0 round 2 l10n: es: 2.26.0 round#2 l10n: bg.po: Updated Bulgarian translation (4839t) l10n: tr: v2.26.0 round 2 l10n: fr : v2.26.0 rnd 2 l10n: git.pot: v2.26.0 round 2 (7 new, 2 removed) l10n: tr: Add glossary for Turkish translations l10n: sv.po: Update Swedish translation (4835t0f0u) ...
2020-03-21l10n: tr.po: change file mode to 644Libravatar Jiang Xin1-0/+0
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-03-20t3419: prevent failure when run with EXPENSIVELibravatar brian m. carlson1-1/+1
This test runs a function which itself runs several assertions. The last of these assertions cleans up the .git/rebase-apply directory, since when run with EXPENSIVE set, the function is invoked a second time to run the same tests with a larger data set. However, as of 2ac0d6273f ("rebase: change the default backend from "am" to "merge"", 2020-02-15), the default backend of rebase has changed, and cleaning up the rebase-apply directory has no effect: it no longer exists, since we're using rebase-merge instead. Since we don't really care which rebase backend is in use, let's just use the command "git rebase --quit", which will do the right thing regardless. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-20l10n: de.po: Update German translation for Git 2.26.0Libravatar Matthias Rüster1-2726/+2906
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com> Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
2020-03-20l10n: de.po: add missing spaceLibravatar Ralf Thielow1-1/+1
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2020-03-19Merge https://github.com/prati0100/git-guiLibravatar Junio C Hamano10-2793/+3854
* 'master' of https://github.com/prati0100/git-gui: git-gui: create a new namespace for chord script evaluation git-gui: reduce Tcl version requirement from 8.6 to 8.5 git-gui--askpass: coerce answers to UTF-8 on Windows git-gui: fix error popup when doing blame -> "Show History Context" git-gui: add missing close bracket git-gui: update German translation git-gui: extend translation glossary template with more terms git-gui: update pot template and German translation to current source code
2020-03-20l10n: tr: Fix a couple of ambiguitiesLibravatar Emir Sarı1-9/+9
Signed-off-by: Emir Sarı <bitigchi@me.com>
2020-03-19Merge branch 'py/remove-tcloo'Libravatar Pratyush Yadav3-35/+35
Reduce the Tcl version requirement to 8.5 to allow git-gui to run on MacOS distributions like High Sierra. While here, fix a potential variable name collision. * py/remove-tcloo: git-gui: create a new namespace for chord script evaluation git-gui: reduce Tcl version requirement from 8.6 to 8.5
2020-03-18RelNotes/2.26.0: fix various typosLibravatar Elijah Newren1-4/+4
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-18l10n: Update Catalan translationLibravatar Jordi Mas1-80/+71
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2020-03-17Sync with Git 2.25.2Libravatar Junio C Hamano3-40/+88
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-17Git 2.25.2Libravatar Junio C Hamano3-2/+62
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-17unicode: update the width tables to Unicode 13.0Libravatar Beat Bolli1-16/+27
Now that Unicode 13.0 has been announced[0], update the character width tables to the new version. [0] https://home.unicode.org/announcing-the-unicode-standard-version-13-0/ Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-17Merge branch 'js/ci-windows-update' into maintLibravatar Junio C Hamano10-73/+93
Updates to the CI settings. * js/ci-windows-update: Azure Pipeline: switch to the latest agent pools ci: prevent `perforce` from being quarantined t/lib-httpd: avoid using macOS' sed
2020-03-17Merge branch 'jk/run-command-formatfix' into maintLibravatar Junio C Hamano1-1/+1
Code style cleanup. * jk/run-command-formatfix: run-command.h: fix mis-indented struct member
2020-03-17Merge branch 'jk/doc-credential-helper' into maintLibravatar Junio C Hamano2-91/+88
Docfix. * jk/doc-credential-helper: doc: move credential helper info into gitcredentials(7)
2020-03-17Merge branch 'js/mingw-open-in-gdb' into maintLibravatar Junio C Hamano2-0/+23
Dev support. * js/mingw-open-in-gdb: mingw: add a helper function to attach GDB to the current process
2020-03-17Merge branch 'js/test-unc-fetch' into maintLibravatar Junio C Hamano1-0/+12
Test updates. * js/test-unc-fetch: t5580: test cloning without file://, test fetching via UNC paths
2020-03-17Merge branch 'js/test-write-junit-xml-fix' into maintLibravatar Junio C Hamano1-1/+2
Testfix. * js/test-write-junit-xml-fix: tests: fix --write-junit-xml with subshells
2020-03-17Merge branch 'en/simplify-check-updates-in-unpack-trees' into maintLibravatar Junio C Hamano1-12/+14
Code simplification. * en/simplify-check-updates-in-unpack-trees: unpack-trees: exit check_updates() early if updates are not wanted
2020-03-17Merge branch 'jc/doc-single-h-is-for-help' into maintLibravatar Junio C Hamano2-1/+8
Both "git ls-remote -h" and "git grep -h" give short usage help, like any other Git subcommand, but it is not unreasonable to expect that the former would behave the same as "git ls-remote --head" (there is no other sensible behaviour for the latter). The documentation has been updated in an attempt to clarify this. * jc/doc-single-h-is-for-help: Documentation: clarify that `-h` alone stands for `help`
2020-03-17Merge branch 'hd/show-one-mergetag-fix' into maintLibravatar Junio C Hamano2-1/+21
"git show" and others gave an object name in raw format in its error output, which has been corrected to give it in hex. * hd/show-one-mergetag-fix: show_one_mergetag: print non-parent in hex form.
2020-03-17Merge branch 'am/mingw-poll-fix' into maintLibravatar Junio C Hamano1-28/+3
MinGW's poll() emulation has been improved. * am/mingw-poll-fix: mingw: workaround for hangs when sending STDIN
2020-03-17Merge branch 'hi/gpg-use-check-signature' into maintLibravatar Junio C Hamano4-72/+75
"git merge signed-tag" while lacking the public key started to say "No signature", which was utterly wrong. This regression has been reverted. * hi/gpg-use-check-signature: Revert "gpg-interface: prefer check_signature() for GPG verification"
2020-03-17Merge branch 'ds/partial-clone-fixes' into maintLibravatar Junio C Hamano2-5/+36
Fix for a bug revealed by a recent change to make the protocol v2 the default. * ds/partial-clone-fixes: partial-clone: avoid fetching when looking for objects partial-clone: demonstrate bugs in partial fetch
2020-03-17Merge branch 'en/t3433-rebase-stat-dirty-failure' into maintLibravatar Junio C Hamano2-2/+53
The merge-recursive machinery failed to refresh the cache entry for a merge result in a couple of places, resulting in an unnecessary merge failure, which has been fixed. * en/t3433-rebase-stat-dirty-failure: merge-recursive: fix the refresh logic in update_file_flags t3433: new rebase testcase documenting a stat-dirty-like failure
2020-03-17Merge branch 'en/check-ignore' into maintLibravatar Junio C Hamano3-19/+35
"git check-ignore" did not work when the given path is explicitly marked as not ignored with a negative entry in the .gitignore file. * en/check-ignore: check-ignore: fix documentation and implementation to match
2020-03-17Merge branch 'jk/push-option-doc-markup-fix' into maintLibravatar Junio C Hamano1-2/+2
Doc markup fix. * jk/push-option-doc-markup-fix: doc/config/push: use longer "--" line for preformatted example
2020-03-17Merge branch 'jk/doc-diff-parallel' into maintLibravatar Junio C Hamano1-1/+1
Update to doc-diff. * jk/doc-diff-parallel: doc-diff: use single-colon rule in rendering Makefile
2020-03-17Merge branch 'jh/notes-fanout-fix' into maintLibravatar Junio C Hamano2-33/+94
The code to automatically shrink the fan-out in the notes tree had an off-by-one bug, which has been killed. * jh/notes-fanout-fix: notes.c: fix off-by-one error when decreasing notes fanout t3305: check notes fanout more carefully and robustly
2020-03-17Merge branch 'jk/index-pack-dupfix' into maintLibravatar Junio C Hamano2-5/+7
The index-pack code now diagnoses a bad input packstream that records the same object twice when it is used as delta base; the code used to declare a software bug when encountering such an input, but it is an input error. * jk/index-pack-dupfix: index-pack: downgrade twice-resolved REF_DELTA to die()
2020-03-17Merge branch 'js/rebase-i-with-colliding-hash' into maintLibravatar Junio C Hamano3-9/+34
"git rebase -i" identifies existing commits in its todo file with their abbreviated object name, which could become ambigous as it goes to create new commits, and has a mechanism to avoid ambiguity in the main part of its execution. A few other cases however were not covered by the protection against ambiguity, which has been corrected. * js/rebase-i-with-colliding-hash: rebase -i: also avoid SHA-1 collisions with missingCommitsCheck rebase -i: re-fix short SHA-1 collision parse_insn_line(): improve error message when parsing failed
2020-03-17Merge branch 'jk/clang-sanitizer-fixes' into maintLibravatar Junio C Hamano5-15/+29
C pedantry ;-) fix. * jk/clang-sanitizer-fixes: obstack: avoid computing offsets from NULL pointer xdiff: avoid computing non-zero offset from NULL pointer avoid computing zero offsets from NULL pointer merge-recursive: use subtraction to flip stage merge-recursive: silence -Wxor-used-as-pow warning
2020-03-17Merge branch 'dt/submodule-rm-with-stale-cache' into maintLibravatar Junio C Hamano2-1/+8
Running "git rm" on a submodule failed unnecessarily when .gitmodules is only cache-dirty, which has been corrected. * dt/submodule-rm-with-stale-cache: git rm submodule: succeed if .gitmodules index stat info is zero
2020-03-17Merge branch 'pb/recurse-submodule-in-worktree-fix' into maintLibravatar Junio C Hamano3-80/+93
The "--recurse-submodules" option of various subcommands did not work well when run in an alternate worktree, which has been corrected. * pb/recurse-submodule-in-worktree-fix: submodule.c: use get_git_dir() instead of get_git_common_dir() t2405: clarify test descriptions and simplify test t2405: use git -C and test_commit -C instead of subshells t7410: rename to t2405-worktree-submodule.sh
2020-03-17Merge branch 'es/outside-repo-errmsg-hints' into maintLibravatar Junio C Hamano3-4/+52
An earlier update to show the location of working tree in the error message did not consider the possibility that a git command may be run in a bare repository, which has been corrected. * es/outside-repo-errmsg-hints: prefix_path: show gitdir if worktree unavailable prefix_path: show gitdir when arg is outside repo
2020-03-17Merge branch 'js/builtin-add-i-cmds' into maintLibravatar Junio C Hamano2-3/+15
Minor bugfixes to "git add -i" that has recently been rewritten in C. * js/builtin-add-i-cmds: built-in add -i: accept open-ended ranges again built-in add -i: do not try to `patch`/`diff` an empty list of files
2020-03-17l10n: sv.po: Update Swedish translation (4839t0f0u)Libravatar Peter Krefting1-266/+296
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2020-03-17git-gui: create a new namespace for chord script evaluationLibravatar Pratyush Yadav1-2/+4
Evaluating the script in the same namespace as the chord itself creates potential for variable name collision. And in that case the script would unknowingly use the chord's variables. For example, say the script has a variable called 'is_completed', which also exists in the chord's namespace. The script then calls 'eval' and sets 'is_completed' to 1 thinking it is setting its own variable, completely unaware of how the chord works behind the scenes. This leads to the chord never actually executing because it sees 'is_completed' as true and thinks it has already completed. Avoid the potential collision by creating a separate namespace for the script that is a child of the chord's namespace. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-03-17git-gui: reduce Tcl version requirement from 8.6 to 8.5Libravatar Pratyush Yadav3-35/+33
On some MacOS distributions like High Sierra, Tcl 8.5 is shipped by default. This makes git-gui error out at startup because of the version mismatch. The only part that requires Tcl 8.6 is SimpleChord, which depends on TclOO. So, don't use it and use our homegrown class.tcl instead. This means some slight syntax changes. Since class.tcl doesn't have an "unknown" method like TclOO does, we can't just call '$note', but have to use '$note activate' instead. The constructor now needs a proper namespace qualifier. Update the documentation to reflect the new syntax. As of now, the only part of git-gui that needs Tcl 8.5 is a call to 'apply' in lib/index.tcl::lambda. Keep using it until someone shows up shouting that their OS ships with 8.4 only. Then we would have to look into implementing it in pure Tcl. Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-03-17l10n: zh_CN: Revise v2.26.0 translationLibravatar Fangyi Zhou1-26/+26
Signed-off-by: Fangyi Zhou <me@fangyi.io> Reviewed-by: 依云 <lilydjwg@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-03-17l10n: zh_CN: for git v2.26.0 l10n round 1 and 2Libravatar Jiang Xin1-2541/+2844
Translate 79 new messages (4839t0f0u) for git 2.26.0. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2020-03-16Git 2.26-rc2Libravatar Junio C Hamano2-5/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-16Merge branch 'en/test-cleanup'Libravatar Junio C Hamano2-23/+17
Test fixes. * en/test-cleanup: t6022, t6046: fix flaky files-are-updated checks