diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-12-17 21:01:25 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-17 20:49:18 -0800 |
commit | 34454e858d2a648b0a6ce56acd9def84bd2a8712 (patch) | |
tree | 724903c66c5c2d6935207393da2623502e5191c4 /t/t3404-rebase-interactive.sh | |
parent | 77680caadb939cf47fd08447b81faadc7c3bd436 (diff) | |
download | git-34454e858d2a648b0a6ce56acd9def84bd2a8712.tar.gz git-34454e858d2a648b0a6ce56acd9def84bd2a8712.tar.xz |
rebase -p -i: handle "no changes" gracefully
Since commit 376ccb8cbb453343998e734d8a1ce79f57a4e092 (rebase -i: style
fixes and minor cleanups), unchanged SHA-1s are no longer mapped via
$REWRITTEN. But the updating phase was not prepared for the old head
not being rewritten.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 907c7f9f6..74a7eb30f 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -184,6 +184,12 @@ test_expect_success 'retain authorship when squashing' ' git show HEAD | grep "^Author: Twerp Snog" ' +test_expect_success '-p handles "no changes" gracefully' ' + HEAD=$(git rev-parse HEAD) && + git rebase -i -p HEAD^ && + test $HEAD = $(git rev-parse HEAD) +' + test_expect_success 'preserve merges with -p' ' git checkout -b to-be-preserved master^ && : > unrelated-file && |