Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Erik de Castro Lopo
Jeff King wrote: > 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 > informat

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Erik de Castro Lopo
Junio C Hamano wrote: > While you are at it, you may want to check your LESS environment > variable settings, especially if you find that the command gives you > control without showing anything for a small (not zero length) file. Thanks. Thats a good tip. In my case LESS was not set to anything.

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Jeff King
On Thu, May 30, 2013 at 10:49:32AM +1000, Erik de Castro Lopo wrote: > Look at this commit: > > git log --name-status f51ac745a6d4087cc4d77a3cee01db0412955c79 > > and notice that one of the files modified is "pib/chkpib2.7", so lets > look at the parent version of that file: > > git sho

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Junio C Hamano
Erik de Castro Lopo writes: > Erik de Castro Lopo wrote: > >> Does this explanation make sense? > > Just to answer my own question, Yes it does. > > The file was added in commit 53266574 and was actually zero length > at that time. While you are at it, you may want to check your LESS environment

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Does this explanation make sense? Just to answer my own question, Yes it does. The file was added in commit 53266574 and was actually zero length at that time. Cheers, Erik -- Erik de Castro Lopo ht

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Erik de Castro Lopo
Jeff King wrote: > Yes, that should work as long as the file is modified and not added. You > can also say "4d77a3cee^:A/B/C" if you do not want to look up the parent > id yourself. Thanks, that's useful to know. > Note that for a merge commit with multiple parents, the question is more > comple

Re: Retrieving a file at a before a specified commit

2013-05-29 Thread Jeff King
On Wed, May 29, 2013 at 04:47:35PM +1000, Erik de Castro Lopo wrote: > I have a commit like this: > > commit 4d77a3cee01db0412956d40875c79f51ac745acc > tree 3443c9f633114c3bd2e015453a8c55a171e62b53 > parent 340d808ade8a79857bec40770f0eb4f98224c53d > author > committer ...

Retrieving a file at a before a specified commit

2013-05-28 Thread Erik de Castro Lopo
Hi all, I have a commit like this: commit 4d77a3cee01db0412956d40875c79f51ac745acc tree 3443c9f633114c3bd2e015453a8c55a171e62b53 parent 340d808ade8a79857bec40770f0eb4f98224c53d author committer . which modifies file A/B/C (ie specifically does not add, but changes an