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:10 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-17 22:55:03 +0300
commitbe0d29d301ffe284b123247d6680b289f73924a4 (patch)
tree5364dd16797391c716fbeaff85d7afc967762dbe /t/t3406-rebase-message.sh
parent33f2b61ff9039247fd26d8b40db7e87e16ffe214 (diff)
rebase --apply: make reflog messages match rebase --merge
The apply backend creates slightly different reflog messages to the merge backend when starting or finishing a rebase and when picking commits. These differences make it harder than it needs to be to parse the reflog (I have a script that reads the finishing messages from rebase and it is a pain to have to accommodate two different message formats). While it is possible to determine the backend used for a rebase from the reflog messages, the differences are not designed for that purpose. c2417d3af7 (rebase: drop '-i' from the reflog for interactive-based rebases, 2020-02-15) removed the clear distinction between the reflog messages of the two backends without complaint. As the merge backend is the default it is likely to be the format most common in existing reflogs. For that reason the apply backend is changed to format its reflog messages to match the merge backend as closely as possible. Note that there is still a difference as when committing a conflict resolution the apply backend will use "(pick)" rather than "(continue)" because it is not currently possible to change the message for a single commit. In addition to c2417d3af7 we also changed the reflog messages in 68aa495b59 (rebase: implement --merge via the interactive machinery, 2018-12-11) and 2ac0d6273f (rebase: change the default backend from "am" to "merge", 2020-02-15). This commit makes the same change to "git rebase --apply" that 2ac0d6273f made to "git rebase" without any backend specific options. As the messages are changed to use an existing format any scripts that can parse the reflog messages of the default rebase backend should be unaffected by this change. There are existing tests for the messages from both backends which are adjusted to ensure that they do not get out of sync in the future. 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.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index bb2a4949ab..5c6cd9af3b 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -88,7 +88,7 @@ test_expect_success 'error out early upon -C<n> or --whitespace=<bad>' '
write_reflog_expect () {
if test $mode = --apply
then
- sed 's/(finish)/finished/; s/ ([^)]*)//'
+ sed 's/(continue)/(pick)/'
else
cat
fi >expect