diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-03-14 11:11:27 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-15 12:47:20 -0700 |
commit | c158dcfc1476bcf6842ba68fc538705323b0e740 (patch) | |
tree | 6c674144f00e5ab5ab1c357c503a07f62a243e23 /git-rebase--interactive.sh | |
parent | 7bad57bb3f0554c0d144288715e6a8fcdda76a64 (diff) | |
download | git-pw/rebase-signoff-with-implicit-i.tar.gz |
rebase --root -k: fix when root commit is emptypw/rebase-signoff-with-implicit-i
When the root commit was empty it was being pruned by the
--cherry-pick option passed to rev-parse. This is because when --onto
is omitted rebase creates an empty commit (which it later amends) for
the new root commit.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r-- | git-rebase--interactive.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 104de328ee..7f90a14309 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -900,7 +900,12 @@ then revisions=$upstream...$orig_head shortrevisions=$shortupstream..$shorthead else - revisions=$onto...$orig_head + if test -n "$squash_onto" + then + revisions=$orig_head + else + revisions=$onto...$orig_head + fi shortrevisions=$shorthead fi if test t != "$preserve_merges" |