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

Re: [PATCH] t1402: test forbidden characters in refnames

From
Nikolaus Schuetz <nikolauspschuetz@gmail.com>
Date
Aug 20, 2026, 14:46 UTC
Message-ID
<20260820144648.47267-1-nikolauspschuetz@gmail.com>
In-Reply-To
<xmqqo6exuagw.fsf@gitster.g>
> True.  And c does not have to be a single byte. ".." can also be
> part of the repertoire.

Agreed and updated accordingly: forbidden chars are looped over, and I folded ".." in along with "\" (the same forbidden-char list). The other refname rules enforced by refs.c are well covered, so I kept the loop to the embedded forbidden tokens.

> By the way, one weird bit: is it intentional that all of these really
> use "heads/something" instead of "refs/heads/something"?

Not intentional -- the file already mixes them (e.g. 'refs/heads/foo.' vs 'heads/foo..bar'). check-ref-format validates each component regardless of a refs/ prefix, so it doesn't change what's tested; I kept 'heads/' to match the neighbours.

Thanks, Nikolaus

Previous: Junio C HamanoNext: Nikolaus Schuetz via GitGitGadget
Message 4 of 7 in “t1402: test forbidden characters in refnames”
  1. t1402: test forbidden characters in refnamesNikolaus Schuetz via GitGitGadget, Aug 13, 2026
  2. Patrick SteinhardtAug 19, 2026
  3. Junio C HamanoAug 19, 2026
  4. Nikolaus SchuetzAug 20, 2026
  5. t1402: test forbidden characters in refnamesNikolaus Schuetz via GitGitGadget, Aug 20, 2026
  6. Junio C HamanoAug 21, 2026
  7. Nikolaus SchuetzAug 23, 2026

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.