Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: Finding a commit

From: Daniele Segato <hidden>
Date: 2016-06-15 22:47:35

On Wed, Oct 21, 2009 at 1:29 PM, Soham Mehta [off-list ref] wrote:
Because SHA1 can change if a commit is cherry-picked around, I cannot just
grep for that SHA1 from git-rev-list or git-log on 'y'. I need a way to know
if a commit with identical changes (as in 'x') is also present in 'y'.
I'm really not an expert of git..

but A commit is something like:

Commit -> Tree ---> Blob1, Blob2, Blob3

Commit, Trees and Blobs are all identified by sha1
the commit should keep information on the author, the "parent"
commit(s) and so on..
the tree should just keep the "snapshot" of the data..

so I think that if you search for the SHA-1 of the tree you should be fine..

But I don't know how you can get the SHA-1 of the tree from a commit
(may be git cat-file <commit-sha> could help you)
and I don't know how to search for that tree around your index...

But I'm sure google (or whatever) has the answer to those questions,

regards,
Daniele
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help