git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/8] check_refname_format(): add FULLY_QUALIFIED flag

From
Jeff King <peff@peff.net>
Date
Apr 30, 2024, 09:47 UTC
Message-ID
<20240430094738.GA1279403@coredump.intra.peff.net>
In-Reply-To
<CAOLa=ZR+nunNg8_LMTzwoHzbBU2EboMSsZRodswLP9bMLhtCpg@mail.gmail.com>
On Mon, Apr 29, 2024 at 09:01:52AM -0700, Karthik Nayak wrote:
Show 9 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Before operating on a refname we get from a user, we usually check that
> > it's syntactically valid. As a general rule, refs should be in the
> > "refs/" namespace, the exception being HEAD and pseudorefs like
> > FETCH_HEAD, etc. Those pseudorefs should consist only of all-caps and
> > dash. But the syntactic rules are not enforced by check_refname_format().
> 
> Nit: s/dash/underscore
Oops, yes. Will fix (and the same mistake in patch 8). Thanks.
> Also FETCH_HEAD is a special_ref, this confusion should however be
> resolved with Patrick's patches [1].

Hmph, I guess I was not paying attention and missed that the distinction even existed. But yeah, I think for the purposes here it is not at all important. This is purely about the syntax rules, which are the same for HEAD, pseudorefs, and special refs.

-Peff
Previous: Karthik NayakNext: Patrick Steinhardt
Message 3 of 8 in “check_refname_format(): add FULLY_QUALIFIED flag”
  1. 6/8 check_refname_format(): add FULLY_QUALIFIED flagJeff King, Apr 29, 2024
  2. Karthik NayakApr 29, 2024
  3. Jeff KingApr 30, 2024
  4. Patrick SteinhardtApr 30, 2024
  5. Patrick SteinhardtApr 30, 2024
  6. Jeff KingApr 30, 2024
  7. Patrick SteinhardtApr 30, 2024
  8. Junio C HamanoApr 30, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.