From: "Steven A. Falco" <sfalco@harris.com>
To: "Steven A. Falco" <sfalco@harris.com>, git@vger.kernel.org
Subject: Re: How can I figure out what commits relate to a given diff?
Date: Thu, 22 May 2008 16:53:41 -0400 [thread overview]
Message-ID: <4835DD55.8080500@harris.com> (raw)
In-Reply-To: <20080522154859.GM27724@genesis.frugalware.org>
Miklos Vajna wrote:
> On Thu, May 22, 2008 at 11:21:34AM -0400, "Steven A. Falco" <sfalco@harris.com> 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.
Thanks! It found the commit I needed.
Steve
next prev parent reply other threads:[~2008-05-22 20:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 15:21 How can I figure out what commits relate to a given diff? Steven A. Falco
2008-05-22 15:48 ` Miklos Vajna
2008-05-22 20:53 ` Steven A. Falco [this message]
2008-05-22 16:04 ` Jeff King
2008-05-23 10:07 ` perforce import: git-p4 memory usage, perforce import: git-p4 memory usage Luke Diamand
2008-05-23 11:25 ` Andreas Ericsson
2008-05-23 22:27 ` Logan Kennelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4835DD55.8080500@harris.com \
--to=sfalco@harris.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.