Subject: Re: [PATCH] branch: advise about ref syntax rules

From: Junio C Hamano <[email-masked]>
Date: Fri, 01 Mar 2024 10:32:58 -0800

"Kristoffer Haugsbakk" <[email-masked]> writes:

> I thought of doing that, but I reckoned that people who have a good
> intuition for the ref syntax would not get this error enough to want to
> turn if off.

If that is your choice, that is perfectly OK, as long as the
proposed log message clearly records why we did not bother using
advice_if_enabled().

If that is the case, then a rewrite for existing die() would become:

	int code = die_message(_("'%s' is not a valid branch name"), name);
	advise(_("See `man git check-ref-format`"));
	exit(code);

Thanks.