Re: [PATCH] show-index: warn when falling back to SHA-1 outside a repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 30, 2026, 17:01 UTC
- Message-ID
- <xmqqms1v6nlv.fsf@gitster.g>
- In-Reply-To
- <aXy0bife-Ubi9gnn@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 8 quoted lines
> I also wonder whether "--quiet" might be a bit _too_ generic in this > context. I would rather want to use this flag for something that you > actually have a good reason to silence, instead of only for a warning. > > In theory, the user already has the ability to silence the warning: they > can simply pass "--object-format=sha256". If you think that's not enough > I'd buid on top of our `advice_if_enabled()` infra, so that the warning > can be globally disabled by setting a config option.
I like the "use --object-format then you would never see this warning" very much. It is possible that we may want to squelch any and all warning and error messages, not limited to this one, in which case it is an option to add "--quiet" to the command, but I somehow feel that it is outside the topic of this change.
Thanks.