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

Re: Retrieving a file at a before a specified commit

From
ELErik de Castro Lopo <mle+tools@mega-nerd.com>
Date
May 30, 2013, 03:19 UTC
Message-ID
<20130530131903.d699bee16aa406790ea96a12@mega-nerd.com>
In-Reply-To
<20130530023446.GA19860@sigill.intra.peff.net>
Jeff King wrote:
Show 23 quoted lines
> Yes, that is what I would expect git to do in such a situation. You can
> inspect it further, too:
> 
>   $ git rev-parse f51ac745^:pib/chkpib2.7
>   e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
> 
> That's the sha1 of the blob containing the content.  You can investigate
> information about that object like this:
> 
>   $ git cat-file -t e69de29b
>   blob
>   $ git cat-file -s e69de29b
>   0
>   $ git cat-file blob e69de29b
> 
> Of course since its size is 0, the last one is not that interesting. :)
> 
> You could also just look at the tree, which gives similar information:
> 
>   $ git ls-tree -lr f51ac745^ | grep pib/chkpib2.7
>   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 pib/chkpib2.7
> 
> Hope that helps.
Yes it does. Thanks!
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
Previous: Jeff King
Message 8 of 8 in “Retrieving a file at a before a specified commit”
  1. Erik de Castro LopoMay 29, 2013
  2. Jeff KingMay 29, 2013
  3. Erik de Castro LopoMay 30, 2013
  4. Erik de Castro LopoMay 30, 2013
  5. Junio C HamanoMay 30, 2013
  6. Erik de Castro LopoMay 30, 2013
  7. Jeff KingMay 30, 2013
  8. Erik de Castro LopoMay 30, 2013

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.