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

patches between different repositories

From
Matthias Lehmann <mat@matlehmann.de>
Date
May 3, 2010, 17:47 UTC
Message-ID
<hrn27j$e3b$1@dough.gmane.org>
Hi all,

I have to apply patches from one repository to another repository, which have a different layout (I am working on splitting one big repository into several smaller ones, while development still continues on the big repository).

So I did

big-repo$ git format-patche -o /tmp/foo @{some-date} -- subdir small-repo$ git apply -p2 --directory=some/path --check /tmp/foo/*

and get

fatal: git diff header lacks filename information when removing 2 leading pathname components (line 37)

the patch looks like this:

35| diff --git a/xyz/bar.jpg b/xyz/bar.jpg 36| new file mode 100644 37| index 0000000000000000000000000000000000000000.. 3dcce2e1f68586ed2089d86b1bf4e7e41c818d97 38| GIT binary patch 39| literal 8791

It seems, like the -p options to git-apply can't handle new files.

Am I doing something wrong here? Or is there another way to merge changes within different repositories with differnt layouts?

Any help would be greatly appreciated.
Best regards,
Matthias
Next: Dmitrijs Ledkovs
Message 1 of 2 in “patches between different repositories”
  1. Matthias LehmannMay 3, 2010
  2. Dmitrijs LedkovsMay 3, 2010

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.