git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Lehmann <mat@matlehmann.de>
To: git@vger.kernel.org
Subject: patches between different repositories
Date: Mon, 03 May 2010 19:47:30 +0200	[thread overview]
Message-ID: <hrn27j$e3b$1@dough.gmane.org> (raw)

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

             reply	other threads:[~2010-05-03 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 17:47 Matthias Lehmann [this message]
2010-05-03 18:04 ` patches between different repositories Dmitrijs Ledkovs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hrn27j$e3b$1@dough.gmane.org' \
    --to=mat@matlehmann.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).