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

Re: `git-rev-parse master` not referred to by any ref?

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Aug 26, 2007, 22:36 UTC
Message-ID
<20070826223610.GB9116@fieldses.org>
In-Reply-To
<7vir72ng1n.fsf@gitster.siamese.dyndns.org>
On Sun, Aug 26, 2007 at 02:26:28PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> It _might_ make it safer to refuse creating anything outside
> refs/ if the name does not contain or ends with "HEAD" (or
> perhaps names that have chars outside "[_A-Z]"), but that would
> restrict future tools that might want to have HEAD-like files,
> so I am a bit hesitant.
Sure.

I would have recovered faster if I'd known had a simple way to get a list of all the refs that git-rev-parse finds. Is there an easy way? I assume "find .git -name .." will miss packed refs. Both git-show-ref and git-for-each-ref seem to ignore top-level references.

Maybe the "refname 'master' is ambiguous" warning could be modified to list the choices? I don't know if that would be overkill.

--b.
Previous: Shawn O. Pearce
Message 6 of 6 in “`git-rev-parse master` not referred to by any ref?”
  1. J. Bruce FieldsAug 26, 2007
  2. J. Bruce FieldsAug 26, 2007
  3. J. Bruce FieldsAug 26, 2007
  4. Junio C HamanoAug 26, 2007
  5. Shawn O. PearceAug 26, 2007
  6. J. Bruce FieldsAug 26, 2007

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.