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

Re: [PATCH 1/2] refs: disallow ref components starting with hyphen

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jul 16, 2012, 13:18 UTC
Message-ID
<500414A0.9080802@alum.mit.edu>
In-Reply-To
<1342440781-18816-2-git-send-email-mschub@elegosoft.com>
On 07/16/2012 02:13 PM, Michael Schubert wrote:
> Currently, we allow refname components to start with a hyphen. There's
> no good reason to do so and it troubles the parseopt infrastructure.
> Explicitly refuse refname components starting with a hyphen inside
> check_refname_component().

Your change to refs.c looks correct. However, you should also update the documentation of the refname rules at the top of refs.c and also in

     Documentation/git-check-ref-format.txt
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Michael SchubertNext: Junio C Hamano
Message 3 of 8 in “refname format cleanup”
  1. refname format cleanupMichael Schubert, Jul 16, 2012
  2. 1/2 refs: disallow ref components starting with hyphenMichael Schubert, Jul 16, 2012
  3. Michael HaggertyJul 16, 2012
  4. Junio C HamanoJul 16, 2012
  5. Junio C HamanoJul 16, 2012
  6. 2/2 symbolic-ref: check format of given refnameMichael Schubert, Jul 16, 2012
  7. Michael HaggertyJul 16, 2012
  8. Junio C HamanoJul 16, 2012

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.