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

Re: Complete http-pull; where should it go?

From
Linus Torvalds <torvalds@osdl.org>
Date
May 1, 2005, 23:48 UTC
Message-ID
<Pine.LNX.4.58.0505011638370.22864@ppc970.osdl.org>
In-Reply-To
<Pine.LNX.4.58.0505011616230.22864@ppc970.osdl.org>
On Sun, 1 May 2005, Linus Torvalds wrote:
Show 7 quoted lines
> 
> For example, take something like "git-diff-cache". I think it's a big
> bonus if you can just write
> 
> 	git-diff-cache HEAD
> 
> and it will pick up the sha1 ID from .git/HEAD. 

Ok, I just committed this. Almost all commands that take SHA1 strings from the command line can now use the shortened format.

Right now it only does the "filename" version, and it tries to append ".git/" to it if it doesn't work, so you can do

	git-diff-cache HEAD

or something like that if you want to. Where ".git/HEAD" would also have worked, or ".git/refs/heads/master" (or just "refs/heads/master").

For example, if you have a refs/tags directory which has been populated with files that point to the tags, you can do

	git-diff-tree -p refs/tags/v2.6.12-rc3 HEAD
and it will do exactly what you'd expect it to do.

I didn't do the ".p1" for parent thing. It would be easy to add, I just haven't decided on a nice syntax for it (I'd like something that is nice and doesn't need quoting, but the ".p1" seems a bit _too_ ugly).

			Linus
Previous: Daniel BarkalowNext: Junio C Hamano
Message 8 of 14 in “Complete http-pull; where should it go?”
  1. Daniel BarkalowMay 1, 2005
  2. Linus TorvaldsMay 1, 2005
  3. Daniel BarkalowMay 1, 2005
  4. Linus TorvaldsMay 1, 2005
  5. Daniel BarkalowMay 1, 2005
  6. Linus TorvaldsMay 1, 2005
  7. Daniel BarkalowMay 1, 2005
  8. Linus TorvaldsMay 1, 2005
  9. Junio C HamanoMay 2, 2005
  10. Linus TorvaldsMay 2, 2005
  11. Junio C HamanoMay 2, 2005
  12. Linus TorvaldsMay 2, 2005
  13. Daniel BarkalowMay 2, 2005
  14. Junio C HamanoMay 1, 2005

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.