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
Pierre Habouzit <madcoder@debian.org>
Date
Sep 7, 2007, 21:04 UTC
Message-ID
<20070907210433.GD23483@artemis.corp>
In-Reply-To
<7vabry43cg.fsf@gitster.siamese.dyndns.org>
On Fri, Sep 07, 2007 at 08:39:43PM +0000, Junio C Hamano wrote:
Show 17 quoted lines
> Pierre Habouzit <madcoder@debian.org> writes:
> 
> > I'd have added though that maybe update-ref should print a warning for
> > the references that do not match the restriction Junio added. This could
> > be done using the function Junio proposed un update_ref() in refs.c
> 
> I would even suggest making it into an error, even if we do not
> error out on the reading side (being liberal when reading but
> more strict when creating, that is).
> 
> That confused_ref() needs to be tightened further, by the way.
> It is called only when we are considering to tack the user
> string immediately below $GIT_DIR/ so the only valid cases are
> (1) the string begins with "refs/", or (2) the string is all
> uppercase (or underscore), especially without slash.  The one in
> the proposed patch is not strict enough and does not enforce the
> former.
  I reckon I didn't checked what the function did in detail, just the
code layout :) And I agree an error is event better, I just don't have
enough knowledge of the scripts that used refs in git for a long time
that such a change could break. I mean, I only use git since the 1.2
(maybe even 1.3) series :)
  I'm always all for refusing dangerous layouts rather than trying too
hard to support cumbersome things that are 99% of the times issues :)
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Junio C HamanoNext: Alex Riesen
Message 10 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.