Re: [PATCH] branch: advise about ref syntax rules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 1, 2024, 18:32 UTC
- Message-ID
- <xmqq34t96bvp.fsf@gitster.g>
- In-Reply-To
- <1ba698b2-a0da-4d62-8174-0ee6d6cd9bbc@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> 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.