summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/mbox.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index dc4cebb..5706a91 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -19,6 +19,7 @@ import shutil
import pathlib
import tempfile
import io
+import shlex
import urllib.parse
import xml.etree.ElementTree
@@ -252,8 +253,11 @@ def make_am(msgs, cmdargs, msgid):
b4.save_git_am_mbox(am_msgs, ifh)
ambytes = ifh.getvalue().encode()
if cmdargs.applyhere:
- # Blindly attempt to apply to the current tree
- ecode, out = b4.git_run_command(topdir, ['am'], stdin=ambytes, logstderr=True)
+ amflags = config.get('git-am-flags', '')
+ sp = shlex.shlex(amflags, posix=True)
+ sp.whitespace_split = True
+ amargs = list(sp)
+ ecode, out = b4.git_run_command(topdir, ['am'] + amargs, stdin=ambytes, logstderr=True)
logger.info(out.strip())
if ecode == 0:
thanks_record_am(lser, cherrypick=cherrypick)