On Tuesday, June 10, 2014 11:55:04 AM UTC-7, Dale Worley wrote:
>
>
>
> I think what will work is: 
>
> 1) Find the first commit before the tag that has a different content 
> for the file: 
>
> $ git log -n 1 <tagname>^ -- <filename> 
> commit b3282e06e39e1ddaa44806eadbfac06a19fabe09 
> ... 
>
> 2) Find the SHA of the file as it is in that commit 
>
> $ git ls-tree <commit> -- <filename> 
> 100644 blob <filehash>        <filename> 
>
> 3) Get the contents of the file within that commit 
>
> $ git cat-file blob <filehash> 
>
> Dale 
>

Yes thats what he wants, I think. He'll use it to step back through commits 
to see when a bug was introduced.

I still don't understand what the commit-SHA given out by git ls-tree is 
for? If it doesn't correspond to a commit on the file as seen in git log, 
what's it used for?

thanks.
 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to