aboutsummaryrefslogtreecommitdiff
path: root/b4/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'b4/__init__.py')
-rw-r--r--b4/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 432a8cd..e936781 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2335,11 +2335,13 @@ def get_pi_thread_by_msgid(msgid, savefile, useproject=None, nocache=False):
@contextmanager
-def git_format_patches(gitdir, start, end, prefixes=None):
+def git_format_patches(gitdir, start, end, prefixes=None, extraopts=None):
with TemporaryDirectory() as tmpd:
gitargs = ['format-patch', '--cover-letter', '-o', tmpd, '--signature', f'b4 {__VERSION__}']
if prefixes is not None and len(prefixes):
gitargs += ['--subject-prefix', ' '.join(prefixes)]
+ if extraopts:
+ gitargs += extraopts
gitargs += ['%s..%s' % (start, end)]
ecode, out = git_run_command(gitdir, gitargs)
if ecode > 0: