From: Palmer Dabbelt <palmer@rivosinc.com>
To: tools@linux.kernel.org
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Subject: [PATCH] shazam: Don't use "git merge --edit" when non-interactive
Date: Thu, 13 Oct 2022 11:10:31 -0700 [thread overview]
Message-ID: <20221013181031.23823-1-palmer@rivosinc.com> (raw)
Most text editors are interactive, so call "git merge --no-edit" when in
b4's non-interactive mode.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
b4/mbox.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/b4/mbox.py b/b4/mbox.py
index ff96a11..59073be 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -374,7 +374,12 @@ def make_am(msgs, cmdargs, msgid):
mergeflags = config.get('shazam-merge-flags', '--signoff')
sp = shlex.shlex(mergeflags, posix=True)
sp.whitespace_split = True
- mergeargs = ['merge', '--no-ff', '-F', mmf, '--edit', 'FETCH_HEAD'] + list(sp)
+ edit = None
+ if cmdargs.no_interactive:
+ edit = '--no-edit'
+ else:
+ edit = '--edit'
+ mergeargs = ['merge', '--no-ff', '-F', mmf, edit, 'FETCH_HEAD'] + list(sp)
mergecmd = ['git'] + mergeargs
thanks_record_am(lser, cherrypick=cherrypick)
--
2.38.0
next reply other threads:[~2022-10-13 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 18:10 Palmer Dabbelt [this message]
2022-10-18 15:31 ` [PATCH] shazam: Don't use "git merge --edit" when non-interactive Konstantin Ryabitsev
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=20221013181031.23823-1-palmer@rivosinc.com \
--to=palmer@rivosinc.com \
--cc=tools@linux.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 read-only IMAP folder(s) and NNTP newsgroup(s).