git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: marcel partap <mpartap@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: git apply-diff / am cannot deal with patches generated with git diff/format-patch --noprefix?
Date: Wed, 10 Aug 2011 15:32:32 -0700	[thread overview]
Message-ID: <7vfwl8sxrz.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4E43053C.5080407@gmx.net> (marcel partap's message of "Thu, 11 Aug 2011 00:25:00 +0200")

marcel partap <mpartap@gmx.net> writes:

> ...at least it seems so. -p0 does not help:
>> fatal: git apply: bad git-diff - inconsistent old filename on line xx

Hmm, does not reproduce for me.

$ git checkout v1.7.6 ;# or whatever random commit I had at hand
$ git show --no-prefix >P.diff
$ grep "^diff --git" P.diff
diff --git Documentation/RelNotes/1.7.6.txt Documentation/RelNotes/1.7.6.txt
diff --git Documentation/git.txt Documentation/git.txt
diff --git GIT-VERSION-GEN GIT-VERSION-GEN
$ git checkout HEAD^
$ git apply -p0 <P.diff
$ git diff v1.7.6 ; echo nothing
nothing
$ git diff --stat
 Documentation/RelNotes/1.7.6.txt |    8 +-------
 Documentation/git.txt            |    5 +++++
 GIT-VERSION-GEN                  |    2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

      reply	other threads:[~2011-08-10 22:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 22:25 git apply-diff / am cannot deal with patches generated with git diff/format-patch --noprefix? marcel partap
2011-08-10 22:32 ` Junio C Hamano [this message]

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=7vfwl8sxrz.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mpartap@gmx.net \
    /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).