Re: How can I figure out what commits relate to a given diff?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 22, 2008 at 11:21:34AM -0400, "Steven A. Falco" <sfalco@xxxxxxxxxx> wrote:
> Is there a way to map a blob SHA1 to a commit?  In this example, I'd
> like to map 9ceadaa and ad31bc6 to their commits.  It seems easy to go
> the other way, seeing what is in a commit, but I've not been able to
> find a method for going "backwards" from a blob to a commit.

Something like:

for i in `git rev-list HEAD`
do
        git ls-tree -r $i|grep -q cb4e8ed && echo "$i contains cb4e8ed"
done

could do it for you.

I don't think there is a --contains for blobs, like git branch
--contains works for commits.

Attachment: pgpvgMllsOnXS.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux