From: Denton Liu <liu.denton@gmail.com>
To: Jerome Pouiller <Jerome.Pouiller@silabs.com>
Cc: Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [BUG] "--show-current-patch" return a mail instead of a patch
Date: Wed, 23 Oct 2019 01:55:03 -0700 [thread overview]
Message-ID: <20191023085503.GA652469@generichostname> (raw)
In-Reply-To: <1791353.RaUiIlXgNR@pc-42>
Hi Jerome,
On Wed, Oct 23, 2019 at 08:49:41AM +0000, Jerome Pouiller wrote:
> On Wednesday 23 October 2019 04:24:58 CEST Junio C Hamano wrote:
> > Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
> > > I try to use "git am" to apply a patch sent using "git send-email". This
> > > patch does not apply properly. I try to use "git am --show-current-patch"
> > > to understand the problem. However, since original mail is encoded in quoted-
> > > printable, data returned by --show-current-patch is not a valid patch.
> >
> > I agree that --show-current-patch is a misdesigned feature. We'd be
> > doing a better service to our users if we documented that the patch
> > and log message are found at .git/rebase-apply/{patch,msg} instead
> > of trying to hide the path.
> >
> > Unfortunately, it is likely that those who added that feature have
> > built their tooling around it to depend on its output being the full
> > e-mail message "am" was fed (and split by "git mailsplit"). So I do
> > not think we will be changing the output to the patch file only.
> >
> > But even then, the documentation can be fixed without any backward
> > compatibility issues. Perhaps like this?
> >
> > Documentation/git-am.txt | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> > index 6f6c34b0f4..f63b70325c 100644
> > --- a/Documentation/git-am.txt
> > +++ b/Documentation/git-am.txt
> > @@ -172,7 +172,7 @@ default. You can use `--no-utf8` to override this.
> > untouched.
> >
> > --show-current-patch::
> > - Show the patch being applied when "git am" is stopped because
> > + Show the entire e-mail message "git am" has stopped at, because
> > of conflicts.
>
> I agree with you: I think that manpage and/or output of "git am" should
> mention ".git/rebase-apply/patch" (that is exactly what I was looking
> for).
I am currently have a WIP patchset that will print the location of the
failed patch file (.git/rebase-apply/patch) in the case of a failure as
well as the line number. Will this be sufficient for your purposes?
Thanks,
Denton
>
> Maybe documentation of --show-current-patch should be clarified with a
> note like "This option is mainly for internal purpose. If you want to
> get current patch, rely on .git/rebase-apply/patch".
>
>
> --
> Jérôme Pouiller
>
next prev parent reply other threads:[~2019-10-23 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 10:18 [BUG] "--show-current-patch" return a mail instead of a patch Jerome Pouiller
2019-10-23 2:24 ` Junio C Hamano
2019-10-23 8:49 ` Jerome Pouiller
2019-10-23 8:55 ` Denton Liu [this message]
2019-10-23 10:15 ` Jerome Pouiller
2019-10-23 11:09 ` Denton Liu
2019-10-23 12:47 ` Jerome Pouiller
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=20191023085503.GA652469@generichostname \
--to=liu.denton@gmail.com \
--cc=Jerome.Pouiller@silabs.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).