diff mbox series

[b4] mbox: Suggest git am -3 if b4 am -3 was used

Message ID 20231130103925.987426-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted
Headers show
Series [b4] mbox: Suggest git am -3 if b4 am -3 was used | expand

Commit Message

Uwe Kleine-König Nov. 30, 2023, 10:39 a.m. UTC
Preparing the patches for a 3-way merge is only sensible if they are
applied benefiting from that additional information. So add -3 to the
git am cmdline suggested in the output of b4 am -3.
---
 b4/mbox.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 5c0668ec3daeae4cc8c6425db360e7a80e060201

Comments

Konstantin Ryabitsev Nov. 30, 2023, 2:08 p.m. UTC | #1
On Thu, 30 Nov 2023 11:39:26 +0100, Uwe Kleine-König wrote:
> Preparing the patches for a 3-way merge is only sensible if they are
> applied benefiting from that additional information. So add -3 to the
> git am cmdline suggested in the output of b4 am -3.
> 
> 

Applied, thanks!

[1/1] mbox: Suggest git am -3 if b4 am -3 was used
      commit: 69c0b5b3f3c705fc8a52feb03c2fd35936e5a6a7

Best regards,
diff mbox series

Patch

diff --git a/b4/mbox.py b/b4/mbox.py
index 054bab7bac1d..feba53465e77 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -418,7 +418,7 @@  def make_am(msgs: List[email.message.Message], cmdargs: argparse.Namespace, msgi
     if base_commit is not None:
         logger.critical('       git checkout -b %s %s', gitbranch, base_commit)
     if cmdargs.outdir != '-':
-        logger.critical('       git am %s', am_filename)
+        logger.critical('       git am %s%s', '-3 ' if cmdargs.threeway else '', am_filename)
     thanks_record_am(lser, cherrypick=cherrypick)