Re: [PATCH 2/2] reflog: implement subcommand to drop reflogs
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Mar 10, 2025, 11:28 UTC
- Message-ID
- <CAOLa=ZS=1mJFJrL=0wLYJ6exhHPyU4n_HxnV1PARfWT+WxcQSg@mail.gmail.com>
- In-Reply-To
- <xmqqbjuccyz0.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 27 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
>>> +The "drop" subcommand removes the reflog for the specified references.
>>> +In contrast, "expire" can be used to prune all entries from a reflog,
>>> +but the reflog itself will still exist for that reference. To fully
>>> +remove the reflog for specific references, use the "drop" subcommand.
>>
>> The last sentence feels like pointless duplication to me. We should
>> likely also point out how it is different from "delete". How about:
>>
>> The "drop" subcommand completely removes the reflog for the
>> specified references. This is in contrast to "expire" and "delete",
>> both of which can be used to delete reflog entries, but not the
>> reflog itself.
>>
>> It might also be useful to add a comment to "delete" to say that it
>> deletes entries, but not the reflog.
>
> Good.
>
>
>>> +#define BUILTIN_REFLOG_DROP_USAGE \
>>> + N_("git reflog drop [--all | <refs>...]")
>>> +
>
> We need a matching change to Documentation/git-reflog.adoc file,
> too, right?I'm assuming you mean documentation specifically for the '--all' option, I will include that in the next version.