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

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

From
Shawn Pearce <spearce@spearce.org>
Date
Apr 19, 2006, 00:21 UTC
Message-ID
<20060419002159.GD8915@spearce.org>
In-Reply-To
<46a038f90604181714j6fce1867wc17952d898f8e7ae@mail.gmail.com>

Not that my voice carries much weight, but a coworker has been asking for this feature to be added to pg for months. I've just been too lazy to get around to writing the shell code to do it. Making it part of git cat-file seems like a good idea, making it usable by other tools like git diff just rocks. :-)

I think its a very worthwhile addition.
Martin Langhoff <martin.langhoff@gmail.com> wrote:
Show 23 quoted lines
> On 4/19/06, Linus Torvalds <torvalds@osdl.org> wrote:
> 
> >   What do people think? Have you ever wanted to
> >   access individual files in some random revision? Do you think this is
> >   useful?
> 
> Definitely, I've several times had to go through contortions to do
> this easily, and I've ended up turning to gitweb often to quickly see
> the state of a file at a given revision.
> 
> > With this, you can do something like
> >
> >         git cat-file blob v1.2.4:Makefile
> >
> > to get the contents of "Makefile" at revision v1.2.4.
> >
> > Now, this isn't necessarily something you really need all that often, but
> > the concept itself is actually pretty powerful. We could, for example,
> > allow things like
> >
> >         git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh
> 
> These two examples are more than enough -- I buy ;-)
-- 
Shawn.
Previous: Martin LanghoffNext: Ray Lehtiniemi
Message 3 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.