Re: [PATCH 06/11] reset_head(): make default_reflog_action optional
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 1, 2021, 21:03 UTC
- Message-ID
- <xmqqh7e05ugl.fsf@gitster.g>
- In-Reply-To
- <4503defe5912aecc4e6a50ac82a31aa7b230456b.1633082702.git.gitgitgadget@gmail.com>
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 31 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > 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 <phillip.wood@dunelm.org.uk> > --- > 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.