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

Re: 'git show' with multiple revisions

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 29, 2015, 16:08 UTC
Message-ID
<xmqqpp6m6hox.fsf@gitster.dls.corp.google.com>
In-Reply-To
<loom.20150429T175626-211@post.gmane.org>
Ed Avis <eda@waniasset.com> writes:
Show 7 quoted lines
> Junio C Hamano <gitster <at> pobox.com> writes:
>
>>"cat-file --batch" will give you the objects in the order you ask.
>
> Thanks, that makes it easy to deal with.  In fact, I might prefer to use
> git cat-file --batch-check and then use some other library to fetch the blob
> contents.

If all you need is a translation from extended SHA-1 object name like HEAD~243:Documentation/README to the raw 40-hex object name, "rev-parse" may turn out to be more suitable tool than that.

It of course depends on your use case.
Previous: Ed Avis
Message 7 of 7 in “'git show' with multiple revisions”
  1. Ed AvisApr 28, 2015
  2. Jeff KingApr 29, 2015
  3. Ed AvisApr 29, 2015
  4. Jeff KingApr 29, 2015
  5. Junio C HamanoApr 29, 2015
  6. Ed AvisApr 29, 2015
  7. Junio C HamanoApr 29, 2015

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.