tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] shazam: Don't use "git merge --edit" when non-interactive
@ 2022-10-13 18:10 Palmer Dabbelt
  2022-10-18 15:31 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Palmer Dabbelt @ 2022-10-13 18:10 UTC (permalink / raw)
  To: tools; +Cc: Palmer Dabbelt

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] shazam: Don't use "git merge --edit" when non-interactive
  2022-10-13 18:10 [PATCH] shazam: Don't use "git merge --edit" when non-interactive Palmer Dabbelt
@ 2022-10-18 15:31 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2022-10-18 15:31 UTC (permalink / raw)
  To: Palmer Dabbelt, tools

On Thu, 13 Oct 2022 11:10:31 -0700, Palmer Dabbelt wrote:
> Most text editors are interactive, so call "git merge --no-edit" when in
> b4's non-interactive mode.
> 
> 

Applied, thanks!

[1/1] shazam: Don't use "git merge --edit" when non-interactive
      commit: ce3c3dfae4bae26175a92e1723e63cda0fcc5154

Best regards,
-- 
Konstantin Ryabitsev <konstantin@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-18 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 18:10 [PATCH] shazam: Don't use "git merge --edit" when non-interactive Palmer Dabbelt
2022-10-18 15:31 ` Konstantin Ryabitsev

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).