summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-12-01 21:41:42 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-12-01 21:41:42 +0900
commit881d72eff8b0d23c8edc6f8d9673f8daafaace6f (patch)
tree9858e8976d76dce70351bced3cc5edb6ea3cf1bb /t
parentMerge branch 'js/rebase-reflog-action-fix' (diff)
parentrebase --stat: fix when rebasing to an unrelated history (diff)
downloadtgif-881d72eff8b0d23c8edc6f8d9673f8daafaace6f.tar.xz
Merge branch 'js/rebase-stat-unrelated-fix'
"git rebase --stat" to transplant a piece of history onto a totally unrelated history were not working before and silently showed wrong result. With the recent reimplementation in C, it started to instead die with an error message, as the original logic was not prepared to cope with this case. This has now been fixed. * js/rebase-stat-unrelated-fix: rebase --stat: fix when rebasing to an unrelated history
Diffstat (limited to 't')
-rwxr-xr-xt/t3406-rebase-message.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index db8505eb86..f64b130cb8 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -117,4 +117,14 @@ test_expect_success 'GIT_REFLOG_ACTION' '
test_cmp expect actual
'
+test_expect_success 'rebase -i onto unrelated history' '
+ git init unrelated &&
+ test_commit -C unrelated 1 &&
+ git -C unrelated remote add -f origin "$PWD" &&
+ git -C unrelated branch --set-upstream-to=origin/master &&
+ git -C unrelated -c core.editor=true rebase -i -v --stat >actual &&
+ test_i18ngrep "Changes to " actual &&
+ test_i18ngrep "5 files changed" actual
+'
+
test_done