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

Re: Merging changes from branches where file paths have changed

From
Thomas Adam <thomas.adam22@gmail.com>
Date
Apr 14, 2012, 19:36 UTC
Message-ID
<CA+39Oz5Jc8Tj6WX+836h_fA6qHDYp6guaoniF6LX027MFHhP0A@mail.gmail.com>
In-Reply-To
<4F89CE36.4000607@kdbg.org>
Hello,
On 14 April 2012 20:21, Johannes Sixt <j6t@kdbg.org> wrote:
Show 8 quoted lines
> You have these histories
>
>
>  A--o--B--C--o--o--D--o--E   <- RepoA
>
>  A'----B'-C'                 <- RepoB
>
> and you want to cherry-pick D and E to RepoB. Right?
Yes, that's about right.
> I suggest that you install a graft in RepoB, then cherry-pick D and E:
>
>  echo $(git rev-parse C' C) >> .git/info/grafts

Can you elaborate on this a little more please? Or point me towards some documentation. Note that due to the way git-filter-branch works, although the history between RepoA and RepoB are common, the commit IDs between the two are completely different; presumably git-filter-branch uses patch-id at some level to reform commits. Nevertheless, if I'm understanding superficially what this graft is supposed to do, I do not see how getting a list of commits from C' to C is going to help in repoB when neither RepoA or RepoB have any ancestry in common?

Kindly,
-- Thomas Adam
Previous: Johannes SixtNext: Johannes Sixt
Message 3 of 4 in “Merging changes from branches where file paths have changed”
  1. Thomas AdamApr 14, 2012
  2. Johannes SixtApr 14, 2012
  3. Thomas AdamApr 14, 2012
  4. Johannes SixtApr 14, 2012

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.