git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Finding a commit

From
Douglas Campos <douglas@theros.info>
Date
Oct 21, 2009, 13:26 UTC
Message-ID
<ed88cb980910210626t750b4cc2r91d1dc22df14eb8b@mail.gmail.com>
In-Reply-To
<4ADEF095.3020406@box.net>
On Wed, Oct 21, 2009 at 9:29 AM, Soham Mehta <soham@box.net> wrote:
Show 13 quoted lines
> 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'.
>
Have you tried git cherry?
-- 
Douglas Campos (qmx)
+55 11 7626 5959
Previous: Daniele Segato
Message 5 of 5 in “Finding a commit”
  1. Soham MehtaOct 21, 2009
  2. Daniele SegatoOct 21, 2009
  3. Thomas RastOct 21, 2009
  4. Daniele SegatoOct 21, 2009
  5. Douglas CamposOct 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.