summaryrefslogtreecommitdiff
path: root/tools/patman/gitutil.py
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2013-03-17 10:31:04 (GMT)
committerSimon Glass <sjg@chromium.org>2013-04-04 21:04:34 (GMT)
commit6d819925d0781b1fa8e5526f73cd277449dc08e1 (patch)
tree816abbfc942005c9849c6b4d9b65c2d0b8a1cdf1 /tools/patman/gitutil.py
parent28b3594eb9b6d20ffab482fe37427502536c2bb6 (diff)
downloadu-boot-fsl-qoriq-6d819925d0781b1fa8e5526f73cd277449dc08e1.tar.xz
patman: Allow specifying the message ID your series is in reply to
Some versions of git don't seem to prompt you for the message ID that your series is in reply to. Allow specifying this from the command line. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/gitutil.py')
-rw-r--r--tools/patman/gitutil.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 99fac79..4e21d4c 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -317,7 +317,7 @@ def BuildEmailList(in_list, tag=None, alias=None):
return result
def EmailPatches(series, cover_fname, args, dry_run, cc_fname,
- self_only=False, alias=None):
+ self_only=False, alias=None, in_reply_to=None):
"""Email a patch series.
Args:
@@ -327,6 +327,8 @@ def EmailPatches(series, cover_fname, args, dry_run, cc_fname,
dry_run: Just return the command that would be run
cc_fname: Filename of Cc file for per-commit Cc
self_only: True to just email to yourself as a test
+ in_reply_to: If set we'll pass this to git as --in-reply-to.
+ Should be a message ID that this is in reply to.
Returns:
Git command that was/would be run
@@ -376,6 +378,9 @@ def EmailPatches(series, cover_fname, args, dry_run, cc_fname,
to = BuildEmailList([os.getenv('USER')], '--to', alias)
cc = []
cmd = ['git', 'send-email', '--annotate']
+ if in_reply_to:
+ cmd.append('--in-reply-to="%s"' % in_reply_to)
+
cmd += to
cmd += cc
cmd += ['--cc-cmd', '"%s --cc-cmd %s"' % (sys.argv[0], cc_fname)]