From ffa952497288d29d94b16675c6789ef83850def3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 15 Feb 2018 15:21:23 -0800 Subject: [PATCH 1/4] Git 2.16.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.16.2.txt | 30 ++++++++++++++++++++++++++++++ GIT-VERSION-GEN | 2 +- RelNotes | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Documentation/RelNotes/2.16.2.txt diff --git a/Documentation/RelNotes/2.16.2.txt b/Documentation/RelNotes/2.16.2.txt new file mode 100644 index 0000000000..a216466d3d --- /dev/null +++ b/Documentation/RelNotes/2.16.2.txt @@ -0,0 +1,30 @@ +Git v2.16.2 Release Notes +========================= + +Fixes since v2.16.1 +------------------- + + * An old regression in "git describe --all $annotated_tag^0" has been + fixed. + + * "git svn dcommit" did not take into account the fact that a + svn+ssh:// URL with a username@ (typically used for pushing) refers + to the same SVN repository without the username@ and failed when + svn.pushmergeinfo option is set. + + * "git merge -Xours/-Xtheirs" learned to use our/their version when + resolving a conflicting updates to a symbolic link. + + * "git clone $there $here" is allowed even when here directory exists + as long as it is an empty directory, but the command incorrectly + removed it upon a failure of the operation. + + * "git stash -- " incorrectly blew away untracked files in + the directory that matched the pathspec, which has been corrected. + + * "git add -p" was taught to ignore local changes to submodules as + they do not interfere with the partial addition of regular changes + anyway. + + +Also contains various documentation updates and code clean-ups. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 470f7b7b83..19e45a7d30 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.16.1 +DEF_VER=v2.16.2 LF=' ' diff --git a/RelNotes b/RelNotes index 0172894cc2..35c3c3221a 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes/2.16.1.txt \ No newline at end of file +Documentation/RelNotes/2.16.2.txt \ No newline at end of file From bb2ac4fcacaf5044b44e2acb918da33a4cca6af1 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Tue, 20 Mar 2018 10:03:13 +0000 Subject: [PATCH 2/4] rebase --root: stop assuming squash_onto is unset If the user set the environment variable 'squash_onto', the 'rebase' command would erroneously assume that the user passed the option '--root'. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- git-rebase.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-rebase.sh b/git-rebase.sh index fd72a35c65..8b1b892d72 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -60,6 +60,7 @@ $(gettext 'Resolve all conflicts manually, mark them as resolved with You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort".') " +squash_onto= unset onto unset restrict_revision cmd= From 76ea235891c08e43226391cceaca8be056a1f803 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Tue, 20 Mar 2018 10:03:14 +0000 Subject: [PATCH 3/4] rebase -i --keep-empty: don't prune empty commits If there are empty commits on the left hand side of $upstream...HEAD then the empty commits on the right hand side that we want to keep are pruned by --cherry-pick. Fix this by using --cherry-mark instead of --cherry-pick and keeping the commits that are empty or are not marked as cherry-picks. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- sequencer.c | 8 ++++++-- t/t3421-rebase-topology-linear.sh | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 4d3f60594c..1a10766492 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2470,7 +2470,7 @@ int sequencer_make_script(FILE *out, int argc, const char **argv, init_revisions(&revs, NULL); revs.verbose_header = 1; revs.max_parents = 1; - revs.cherry_pick = 1; + revs.cherry_mark = 1; revs.limited = 1; revs.reverse = 1; revs.right_only = 1; @@ -2495,8 +2495,12 @@ int sequencer_make_script(FILE *out, int argc, const char **argv, return error(_("make_script: error preparing revisions")); while ((commit = get_revision(&revs))) { + int is_empty = is_original_commit_empty(commit); + + if (!is_empty && (commit->object.flags & PATCHSAME)) + continue; strbuf_reset(&buf); - if (!keep_empty && is_original_commit_empty(commit)) + if (!keep_empty && is_empty) strbuf_addf(&buf, "%c ", comment_line_char); strbuf_addf(&buf, "%s %s ", insn, oid_to_hex(&commit->object.oid)); diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh index 68fe2003ef..52fc6885e5 100755 --- a/t/t3421-rebase-topology-linear.sh +++ b/t/t3421-rebase-topology-linear.sh @@ -215,7 +215,7 @@ test_run_rebase () { } test_run_rebase success '' test_run_rebase failure -m -test_run_rebase failure -i +test_run_rebase success -i test_run_rebase failure -p # m From 3d946165e1177905103a25aeb374e018c510e540 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Tue, 20 Mar 2018 10:03:15 +0000 Subject: [PATCH 4/4] rebase: respect --no-keep-empty $OPT_SPEC has always allowed --no-keep-empty so lets start handling it. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- git-rebase.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-rebase.sh b/git-rebase.sh index 8b1b892d72..37b8f13971 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -263,6 +263,9 @@ do --keep-empty) keep_empty=yes ;; + --no-keep-empty) + keep_empty= + ;; --preserve-merges) preserve_merges=t test -z "$interactive_rebase" && interactive_rebase=implied