Finding a commit
- From
- Soham Mehta <soham@box.net>
- Date
- Oct 21, 2009, 11:29 UTC
- Message-ID
- <4ADEF095.3020406@box.net>
Given a SHA1 of a commit from one repository (say x), wondering what is a proper way to find out if that commit (change) also exists in a different repository (say y).
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 realize that Author and Timestamp do not change when the commit is moved (fetched, pushed, pulled, rebased, cherry-picked etc). So my current solution relies on grepping for the pair of Author-Timestamp from git-log on 'y'.
Wondering if there is more appropriate way of doing this?
Thanks. -Soham