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

Re: [PATCH] HEAD, ORIG_HEAD and FETCH_HEAD are really special.

From
Nicolas Pitre <nico@cam.org>
Date
Sep 7, 2007, 16:29 UTC
Message-ID
<alpine.LFD.0.9999.0709071222270.21186@xanadu.home>
In-Reply-To
<1189181313.30308.97.camel@koto.keithp.com>
On Fri, 7 Sep 2007, Keith Packard wrote:
Show 14 quoted lines
> On Fri, 2007-09-07 at 04:21 -0700, Junio C Hamano wrote:
> 
> > This patch brings in a new world order by introducing a backward
> > incompatible change.  When the string the user gave us does not
> > contain any slash, we do not apply the first entry (i.e.
> > directly underneath .git/ without any "refs/***") unless the
> > name consists solely of uppercase letters or an underscore,
> > thereby ignoring .git/master.  The ones we often use, such as
> > HEAD and ORIG_HEAD are not affected by this change.
> 
> It seems to me that instead of introducing an incompatible (but probably
> useful) change, a sensible option would be to have the ambiguous
> reference be an error instead of a warning. One shouldn't be encouraged
> to use names in .git that conflict with stuff in refs/heads anyway.

I agree. IMHO the sensible thing to do is to always warn, and error out by default. I see no advantage for core.warnAmbiguousRefs=false other than allow the user to shoot himself in the foot someday. Instead, we should have core.allowAmbiguousRefs set to off by default.

Nicolas
Previous: Keith PackardNext: Junio C Hamano
Message 14 of 17 in “rebase from ambiguous ref discards changes”
  1. Keith PackardSep 6, 2007
  2. Pierre HabouzitSep 6, 2007
  3. Junio C HamanoSep 6, 2007
  4. Keith PackardSep 7, 2007
  5. Pierre HabouzitSep 7, 2007
  6. HEAD, ORIG_HEAD and FETCH_HEAD are really special.Junio C Hamano, Sep 7, 2007
  7. Johannes SixtSep 7, 2007
  8. Pierre HabouzitSep 7, 2007
  9. Junio C HamanoSep 7, 2007
  10. Pierre HabouzitSep 7, 2007
  11. Alex RiesenSep 8, 2007
  12. Keith PackardSep 7, 2007
  13. Keith PackardSep 7, 2007
  14. Nicolas PitreSep 7, 2007
  15. Junio C HamanoSep 7, 2007
  16. Carl WorthSep 7, 2007
  17. Junio C HamanoSep 7, 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.