From 7c1d044ff1d5235e598d4c777c4abfe60e0a09a8 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Wed, 20 Oct 2021 10:37:05 -0400 Subject: shazam: change default behaviour to be "apply-here" Based on the feedback, change the default behaviour of "b4 shazam" to apply patches to the current tree instead of doing FETCH_HEAD magic. This is still available when used with -H,--make-fetch-head flag. Signed-off-by: Konstantin Ryabitsev --- b4/mbox.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'b4/mbox.py') diff --git a/b4/mbox.py b/b4/mbox.py index 1b35623..9a673c7 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -262,7 +262,7 @@ def make_am(msgs, cmdargs, msgid): ifh = io.StringIO() b4.save_git_am_mbox(am_msgs, ifh) ambytes = ifh.getvalue().encode() - if cmdargs.applyhere: + if not cmdargs.makefetchhead: amflags = config.get('git-am-flags', '') sp = shlex.shlex(amflags, posix=True) sp.whitespace_split = True @@ -711,10 +711,10 @@ def main(cmdargs): cmdargs.nopartialreroll = False cmdargs.outdir = '-' cmdargs.guessbranch = None - if cmdargs.applyhere: - cmdargs.guessbase = False - else: + if cmdargs.makefetchhead: cmdargs.guessbase = True + else: + cmdargs.guessbase = False if cmdargs.checknewer: # Force nocache mode -- cgit v1.2.3