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

Re: How to view an old revision?

From
Andy Whitcroft <apw@shadowen.org>
Date
Nov 1, 2006, 14:46 UTC
Message-ID
<4548B32A.5030803@shadowen.org>
In-Reply-To
<3bbc18d20611010637s6d05aecbt98322b62cf7235e8@mail.gmail.com>
Matt McCutchen wrote:
Show 6 quoted lines
> On 11/1/06, Andy Whitcroft <apw@shadowen.org> wrote:
>>         git cat-file -p <commit-ish>:<file>
> 
> Nice!  Thanks!  I had guessed "git cat-file -p <commit-ish>/<file>"
> but didn't try a colon as the separator.  The colon syntax ought to be
> mentioned in the git-cat-file man page.

There are some improvements in the documentation in 'next' but nothing which would make this easier for you to find.

Junio, I wonder if we should be changing the usage for this command slightly. Currently, it mearly says <object> as the identifier for the blob. Really this is <object-ish> as it supports symbolic naming in addition to raw sha1's. I also feel it would be very helpful if <commit-ish> and family were documented as a glossary section in main git manpage.

Something like this:

<commit-ish>:: is an sha1 for a commit, or any symbolic name for a commit (see SPECIFYING REVISIONS in git-rev-parse)

What do people think. I can do the munging about if its seems like a sane plan.

Previous: Matt McCutchenNext: Junio C Hamano
Message 4 of 7 in “How to view an old revision?”
  1. Matt McCutchenNov 1, 2006
  2. Andy WhitcroftNov 1, 2006
  3. Matt McCutchenNov 1, 2006
  4. Andy WhitcroftNov 1, 2006
  5. Junio C HamanoNov 1, 2006
  6. Matt McCutchenNov 1, 2006
  7. Andy WhitcroftNov 1, 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.