mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
rebase --apply: respect GIT_REFLOG_ACTION
The reflog messages when finishing a rebase hard code "rebase" rather than using GIT_REFLOG_ACTION. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1f2d5dc4d2
commit
33f2b61ff9
|
@ -582,10 +582,11 @@ static int move_to_original_branch(struct rebase_options *opts)
|
|||
if (!opts->onto)
|
||||
BUG("move_to_original_branch without onto");
|
||||
|
||||
strbuf_addf(&branch_reflog, "rebase finished: %s onto %s",
|
||||
strbuf_addf(&branch_reflog, "%s finished: %s onto %s",
|
||||
getenv(GIT_REFLOG_ACTION_ENVIRONMENT),
|
||||
opts->head_name, oid_to_hex(&opts->onto->object.oid));
|
||||
strbuf_addf(&head_reflog, "rebase finished: returning to %s",
|
||||
opts->head_name);
|
||||
strbuf_addf(&head_reflog, "%s finished: returning to %s",
|
||||
getenv(GIT_REFLOG_ACTION_ENVIRONMENT), opts->head_name);
|
||||
ropts.branch = opts->head_name;
|
||||
ropts.flags = RESET_HEAD_REFS_ONLY;
|
||||
ropts.branch_msg = branch_reflog.buf;
|
||||
|
|
|
@ -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)/rebase finished/; s/ ([^)]*)//'
|
||||
sed 's/(finish)/finished/; s/ ([^)]*)//'
|
||||
else
|
||||
cat
|
||||
fi >expect
|
||||
|
|
Loading…
Reference in a new issue