Re: [PATCH 9/9] refs: add a '--required' flag to 'git refs optimize'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 13, 2025, 14:37 UTC
- Message-ID
- <xmqqh5w250lw.fsf@gitster.g>
- In-Reply-To
- <xmqqwm4y538p.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Perhaps "--check-" followed by a word specific to what we are trying > to achieve (e.g., if we are trying to see if auto-compaction is > necessary, "--check-for-auto" "check for auto compaction")? I > dunno.
After reading what you did in the previou step, I am reasonably sure "required" is a wrong word to use, with or without other words like "check". Semantically it is similar to the should_pack_refs() check that we use for pack-refs even before "optimize" came. We expect it to answer this question cheaply: are we better off if we repacked, or can we go on without repacking for now? It is not about "are we performing so poorly that we MUST optimize now?"