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

Re: ref name troubles, was Re: [PATCH v2] Introduce %<branch> as shortcut to the tracked branch

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 20, 2009, 21:48 UTC
Message-ID
<alpine.DEB.1.00.0903202246060.6865@intel-tinevez-2-302>
In-Reply-To
<alpine.LNX.1.00.0903201515490.19665@iabervon.org>
Hi,
On Fri, 20 Mar 2009, Daniel Barkalow wrote:
Show 24 quoted lines
> On Fri, 20 Mar 2009, Junio C Hamano wrote:
> 
> > Petr Baudis <pasky@suse.cz> writes:
> > 
> > >> "git branch" I agree with, but not "git update-ref".  As plumbing, 
> > >> the latter should be much more allowing, feeding rope aplenty (but 
> > >> also allowing cool tricks we do not think about yet).
> > >
> > > We shouldn't allow creating insane ref names even with update-ref. 
> > > That way porcelains cannot rely on update-ref to sanity check the 
> > > user's crap. At most, maybe you might want to bypass this check with 
> > > some force switch, though I really can't quite imagine why.
> > 
> > That's all nice and clean in theory, but it was more or less the same 
> > reasoning as what was behind the tightening not to allow anything but 
> > refs/heads pointed by HEAD, but you know what fell out of it.  
> > "Insane" and "crap" are in the eye of the beholder.
> 
> I think there's no possible use to being able to use update-ref to 
> create a ref that rev-parse can't be made to read. I think people will 
> want to do all sorts of things that are insane (I'd personally like some 
> refs with the basename "..."), but they're only likely to do insane 
> things that happen to work, rather than insane things that aren't 
> prevented but still don't work.

Of course, you are forgetting that rev-parse may well have been able to grok such a ref at some stage.

And at that stage, it becomes not a user error, but a _huge_ mistake by us, the Git developers.

Don't blame the user (http://www.schneier.com/blog/archives/2009/03/it_security_bla.html).

Ciao, Dscho

Previous: Daniel BarkalowNext: Junio C Hamano
Message 60 of 61 in “Re: Git {log,diff} against tracked branch?”
  1. Petr BaudisMar 18, 2009
  2. Introduce %<branch> as shortcut to the tracked branchJohannes Schindelin, Mar 18, 2009
  3. Andreas GruenbacherMar 18, 2009
  4. Introduce %<branch> as shortcut to the tracked branchJohannes Schindelin, Mar 18, 2009
  5. Andreas GruenbacherMar 18, 2009
  6. Johannes SchindelinMar 18, 2009
  7. Junio C HamanoMar 18, 2009
  8. Johannes SchindelinMar 18, 2009
  9. Michael J GruberMar 19, 2009
  10. Michael J GruberMar 19, 2009
  11. Johannes SchindelinMar 20, 2009
  12. ref name troubles, was Re: [PATCH v2] Introduce %<branch> as shortcut to the tracked branchJohannes Schindelin, Mar 20, 2009
  13. Shawn O. PearceMar 20, 2009
  14. Shawn O. PearceMar 20, 2009
  15. Sverre RabbelierMar 20, 2009
  16. Introduce BEL<branch> as shortcut to the tracked branchJohannes Schindelin, Mar 20, 2009
  17. Wincent ColaiutaMar 20, 2009
  18. Johannes SchindelinMar 20, 2009
  19. Santi BéjarMar 20, 2009
  20. Andreas GruenbacherMar 20, 2009
  21. Matthieu MoyMar 20, 2009
  22. Johannes SchindelinMar 20, 2009
  23. Mikael MagnussonMar 20, 2009
  24. Johannes SchindelinMar 20, 2009
  25. Document and test the new % shotcut for the tracked branchMichael J Gruber, Mar 20, 2009
  26. Johannes SchindelinMar 20, 2009
  27. Michael J GruberMar 20, 2009
  28. Petr BaudisMar 20, 2009
  29. Johannes SchindelinMar 20, 2009
  30. Petr BaudisMar 22, 2009
  31. Michael J GruberMar 20, 2009
  32. Introduce %<branch> as shortcut to the tracked branchJohannes Schindelin, Mar 20, 2009
  33. Junio C HamanoMar 20, 2009
  34. Johannes SchindelinMar 20, 2009
  35. Junio C HamanoMar 20, 2009
  36. Jeff KingMar 20, 2009
  37. Julian PhillipsMar 20, 2009
  38. Jeff KingMar 20, 2009
  39. Julian PhillipsMar 20, 2009
  40. Sverre RabbelierMar 20, 2009
  41. Julian PhillipsMar 20, 2009
  42. Sverre RabbelierMar 20, 2009
  43. Andreas GruenbacherMar 21, 2009
  44. Miles BaderMar 21, 2009
  45. Julian PhillipsMar 21, 2009
  46. Julian PhillipsMar 21, 2009
  47. Björn SteinbrinkMar 20, 2009
  48. Jeff KingMar 20, 2009
  49. Junio C HamanoMar 20, 2009
  50. Johannes SchindelinMar 20, 2009
  51. Petr BaudisMar 20, 2009
  52. Johannes SchindelinMar 20, 2009
  53. Petr BaudisMar 20, 2009
  54. Johannes SchindelinMar 20, 2009
  55. Michael J GruberMar 20, 2009
  56. Johannes SchindelinMar 20, 2009
  57. Michael J GruberMar 20, 2009
  58. Junio C HamanoMar 20, 2009
  59. Daniel BarkalowMar 20, 2009
  60. Johannes SchindelinMar 20, 2009
  61. Junio C HamanoMar 21, 2009

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.