Re: [PATCH 06/11] reset_head(): make default_reflog_action optional
From: Junio C Hamano <hidden>
Date: 2021-10-01 21:03:11
"Phillip Wood via GitGitGadget" [off-list ref] writes:
quoted hunk
From: Phillip Wood <redacted> This parameter is only needed when a ref is going to be updated and the caller does not pass an explicit reflog message. Callers that are just discarding changes in the working tree like create_autostash() do not update any refs so should not have to worry about passing this parameter. Signed-off-by: Phillip Wood <redacted> --- builtin/merge.c | 6 ++---- builtin/rebase.c | 14 ++++++-------- reset.c | 16 ++++++++++++---- sequencer.c | 6 +++--- sequencer.h | 3 +-- 5 files changed, 24 insertions(+), 21 deletions(-)diff --git a/builtin/merge.c b/builtin/merge.c index d2c52b6e971..35833a963fc 100644 --- a/builtin/merge.c +++ b/builtin/merge.c@@ -1561,8 +1561,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) if (autostash) create_autostash(the_repository, - git_path_merge_autostash(the_repository), - "merge"); + git_path_merge_autostash(the_repository)); if (checkout_fast_forward(the_repository, &head_commit->object.oid, &commit->object.oid,
The title talks about an optional change to reset_head(); perhaps a change to create_autostash() should be a separate preliminary step.