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

Re: [RFC] get_sha1() shorthands for blob/tree objects

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 19, 2006, 00:44 UTC
Message-ID
<Pine.LNX.4.64.0604181735480.3701@g5.osdl.org>
In-Reply-To
<7vy7y2csv8.fsf@assigned-by-dhcp.cox.net>
On Tue, 18 Apr 2006, Junio C Hamano wrote:
> 
> Yes, I wanted to do this myself for a while.  The only issue I
> might have is what the separator character between rev and path
> should be.

I didn't put a lot of thought into it, but using ':' not only is pretty visually pleasing, it also means that shell completion automatically works at least on bash, even without any git-specific completion rules.

That's not true for a lot of other special characters: colon really is special, exactly because it has been used for things like PATH separators, etc.

I'm a total filename completion junkie - I simply cannot type in a filename any more. I'll literally press <tab> to complete even short filenames, just because it gives me that nice confirmation of the existence of the filename (ie I've typed it all in, and the <tab> adds the space after the filename).

So to me, ':' is just clearly superior. I can't think of any other separator that works with filename completion and has no shell issues, _and_ looks logical.

And I thought we already disallowed ':' in branch names because cogito uses them for the strange <rev>:<rev> syntax..

		Linus
Previous: Junio C HamanoNext: Linus Torvalds
Message 6 of 24 in “[RFC] get_sha1() shorthands for blob/tree objects”
  1. Linus TorvaldsApr 18, 2006
  2. Martin LanghoffApr 19, 2006
  3. Shawn PearceApr 19, 2006
  4. Ray LehtiniemiApr 19, 2006
  5. Junio C HamanoApr 19, 2006
  6. Linus TorvaldsApr 19, 2006
  7. Linus TorvaldsApr 19, 2006
  8. Andreas EricssonApr 19, 2006
  9. Linus TorvaldsApr 19, 2006
  10. Junio C HamanoApr 19, 2006
  11. Linus TorvaldsApr 19, 2006
  12. Linus TorvaldsApr 19, 2006
  13. Junio C HamanoApr 19, 2006
  14. Linus TorvaldsApr 19, 2006
  15. Junio C HamanoApr 19, 2006
  16. Linus TorvaldsApr 19, 2006
  17. Junio C HamanoApr 19, 2006
  18. Linus TorvaldsApr 19, 2006
  19. Martin LanghoffApr 19, 2006
  20. Linus TorvaldsApr 19, 2006
  21. Linus TorvaldsApr 19, 2006
  22. [RFC] get_sha1(): :path and :[0-3]:path to extract from index.Junio C Hamano, Apr 22, 2006
  23. Uwe ZeisbergerApr 25, 2006
  24. Junio C HamanoApr 25, 2006

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.