From: pbonzini@redhat.com
To: git@vger.kernel.org
Cc: bfields@redhat.com
Subject: [PATCH 0/4] am: provide a replacement for "cat .git/rebase-apply/patch"
Date: Wed, 19 Feb 2020 17:13:48 +0100 [thread overview]
Message-ID: <20200219161352.13562-1-pbonzini@redhat.com> (raw)
From: Paolo Bonzini <pbonzini@redhat.com>
When "git am --show-current-patch" was added in commit 984913a210 ("am:
add --show-current-patch", 2018-02-12), "git am" started recommending it
as a replacement for .git/rebase-merge/patch. Unfortunately the suggestion
is misguided; for example, the output "git am --show-current-patch" cannot
be passed to "git apply" if it is encoded as quoted-printable or base64.
This series adds a new mode to "git am --show-current-patch" in order to
straighten the suggestion. "--show-current-patch" grows an optional
argument, where the default behavior can now also be obtained with
"--show-current-patch=raw" and ".git/rebase-apply/patch" can be retrieved
with "--show-current-patch=diff".
This requires a little surgery in patches 1 and 2 in order to convert
--show-current-patch from OPTION_CMDMODE to OPTION_CALLBACK. After this,
the last two patches implement the new syntax and feature.
Thanks,
Paolo
Paolo Bonzini (4):
parse-options: convert "command mode" to a flag
am: convert "resume" variable to a struct
am: support --show-current-patch=raw as a synonym
for--show-current-patch
am: support --show-current-patch=diff to retrieve
.git/rebase-apply/patch
Documentation/git-am.txt | 10 +--
builtin/am.c | 96 ++++++++++++++++++++------
contrib/completion/git-completion.bash | 5 ++
parse-options.c | 20 +++---
parse-options.h | 8 +--
t/helper/test-parse-options.c | 2 +
t/t0040-parse-options.sh | 18 +++++
t/t4150-am.sh | 20 ++++++
8 files changed, 140 insertions(+), 39 deletions(-)
--
2.21.1
next reply other threads:[~2020-02-19 16:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 16:13 pbonzini [this message]
2020-02-19 16:13 ` [PATCH 1/4] parse-options: convert "command mode" to a flag pbonzini
2020-02-19 19:11 ` Eric Sunshine
2020-02-20 16:00 ` Johannes Schindelin
2020-02-19 19:15 ` Junio C Hamano
2020-02-19 21:05 ` Paolo Bonzini
2020-02-19 16:13 ` [PATCH 2/4] am: convert "resume" variable to a struct pbonzini
2020-02-19 19:19 ` Junio C Hamano
2020-02-19 21:05 ` Paolo Bonzini
2020-02-19 16:13 ` [PATCH 3/4] am: support --show-current-patch=raw as a synonym for--show-current-patch pbonzini
2020-02-19 19:34 ` Eric Sunshine
2020-02-19 20:17 ` Junio C Hamano
2020-02-19 20:53 ` Paolo Bonzini
2020-02-19 16:13 ` [PATCH 4/4] am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch pbonzini
2020-02-19 19:49 ` Eric Sunshine
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=20200219161352.13562-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=bfields@redhat.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).