From: "Constantine A. Murenin" <mureninc@gmail.com>
To: git@vger.kernel.org
Subject: Re: git-am doesn't apply the rest of the email after a partial patch fail?
Date: Sun, 7 Apr 2013 14:23:44 -0700 [thread overview]
Message-ID: <CAPKkNb4MKZjo+OfqApL+pc4uhoTfTfxcM1h1YCAF8=Eq4H5ctg@mail.gmail.com> (raw)
In-Reply-To: <CAPKkNb43bWupbOaAntF8VJQ8ZJjt8SG-mZa3GohxZEAZQm-evQ@mail.gmail.com>
So, it turns out, `--reject` is not default for git-am / git-apply,
and has to be explicitly specified for the desired behaviour. Makes
no sense, if you ask me, and especially the below error message, which
tells you nothing about having to use `--reject`:
% git am ../grok-old-hg-git.git/00{27,28,29,30,31}*
...
error: patch failed: build.xml:178
error: build.xml: patch does not apply
error: patch failed: src/org/opensolaris/opengrok/analysis/AnalyzerGuru.java:64
error: src/org/opensolaris/opengrok/analysis/AnalyzerGuru.java: patch
does not apply
Patch failed at 0001 src/.../uue/Uuencode*{lex,java}: introducing
uuencode(5) support
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
%
Correcting the specified failures and running `git am --resolved`
won't get you anywhere. Have to abort, and run `git am --reject` to
get anywhere.
C.
On 7 April 2013 11:00, Constantine A. Murenin <mureninc@gmail.com> wrote:
> Hi,
>
> I'm trying to convert/rebase about 40 local patches from an old
> mercurial fork of OpenGrok (upstream used to use hg), to the new git
> repository (upstream has recently switched to github).
>
> What I decided to do is convert my old mercurial repo to git (by
> pushing with py-hg-git to a git repository, and then checking out with
> git), and use `git format-patch` from an old .hg-git.git repository,
> and then use `git am` on the new (upstream git) repository of the
> `format-patch` mails from an old one.
>
> However, what I've faced with, is that when a conflict happens, and I
> resolve, and do `git add`, and `git am --resolved`, then the rest of
> the `format-patch` email where the conflict has occurred is discarded,
> and the subsequent patch/email now doesn't want to apply either, since
> all of the previous patch/email is missing, other than the manually
> added changes.
>
> What gives? Does `git am --resolve` discard the rest of the mail, if
> any patching errors occur? Is one supposed to apply the whole
> `format-patch` email manually when `git am` does encounter some
> problem with only some minor parts of that email?
>
> % git --version; uname -rms
> git version 1.7.6
> OpenBSD 5.2 amd64
>
> C.
next prev parent reply other threads:[~2013-04-08 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-07 18:00 git-am doesn't apply the rest of the email after a partial patch fail? Constantine A. Murenin
2013-04-07 21:23 ` Constantine A. Murenin [this message]
2013-04-08 17:49 ` Junio C Hamano
2013-04-09 18:34 ` Constantine A. Murenin
2013-04-09 18:57 ` Junio C Hamano
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='CAPKkNb4MKZjo+OfqApL+pc4uhoTfTfxcM1h1YCAF8=Eq4H5ctg@mail.gmail.com' \
--to=mureninc@gmail.com \
--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).