Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2022-10-12 12:35:08 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-17 22:55:03 +0300
commit1f2d5dc4d2bbcae87736fcd7b7c0e6542008c5f7 (patch)
tree959c81b4e972fb9f38f8ef13e4cd6a61f702e576 /t/t3406-rebase-message.sh
parentda1d63363f13d4d65c59564c74fd8dd598b39c49 (diff)
rebase --merge: fix reflog message after skipping
The reflog message for every pick after running "rebase --skip" looks like rebase (skip) (pick): commit subject line Fix this by not appending " (skip)" to the reflog action. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3406-rebase-message.sh')
-rwxr-xr-xt/t3406-rebase-message.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index 3ca2fbb0d5..8aa6a79acc 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -163,6 +163,30 @@ test_reflog () {
# check there is only one new entry in the branch reflog
test_cmp_rev fast-forward@{1} X
'
+
+ test_expect_success "rebase $mode --skip reflog${reflog_action:+ GIT_REFLOG_ACTION=$reflog_action}" '
+ git checkout conflicts &&
+ test_when_finished "git reset --hard Q" &&
+
+ (
+ if test -n "$reflog_action"
+ then
+ GIT_REFLOG_ACTION="$reflog_action" &&
+ export GIT_REFLOG_ACTION
+ fi &&
+ test_must_fail git rebase $mode main &&
+ git rebase --skip
+ ) &&
+
+ git log -g --format=%gs -4 >actual &&
+ write_reflog_expect <<-EOF &&
+ ${reflog_action:-rebase} (finish): returning to refs/heads/conflicts
+ ${reflog_action:-rebase} (pick): Q
+ ${reflog_action:-rebase} (pick): P
+ ${reflog_action:-rebase} (start): checkout main
+ EOF
+ test_cmp expect actual
+ '
}
test_reflog --merge