From: Mathieu Malaterre <malat@debian.org>
To: git@vger.kernel.org
Subject: How to prepare patch for git am which remove a file ?
Date: Tue, 20 Nov 2018 13:39:40 +0100 [thread overview]
Message-ID: <CA+7wUsz5WyRcxMTUWTg13K866vWWp+bVGSZJFU1hRSL1Ehr8Aw@mail.gmail.com> (raw)
Here is a simple setup:
cd /tmp
mkdir g
cd g
git init .
wget http://central.maven.org/maven2/org/apache/xmlgraphics/fop/2.1/fop-2.1.pom
git add fop-2.1.pom
git commit -m "My First Commit"
git rm fop-2.1.pom
git commit -m "Second Commit"
git format-patch HEAD~
git reset --hard HEAD~
git am 0001-Second-Commit.patch
Applying: Second Commit
error: patch failed: fop-2.1.pom:1
error: fop-2.1.pom: patch does not apply
Patch failed at 0001 Second Commit
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
What is the black magic to get `git am` to understand this patch ?
Please note that:
$ patch --dry-run -p1 < 0001-Second-Commit.patch
checking file fop-2.1.pom
Thanks!
next reply other threads:[~2018-11-20 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 12:39 Mathieu Malaterre [this message]
2018-11-20 12:55 ` How to prepare patch for git am which remove a file ? SZEDER Gábor
2018-11-20 13:08 ` Mathieu Malaterre
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+7wUsz5WyRcxMTUWTg13K866vWWp+bVGSZJFU1hRSL1Ehr8Aw@mail.gmail.com \
--to=malat@debian.org \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).