Re: [StGit PATCH 2/2] Pass the --in-reply-to and --no-thread options to git send-email
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Jan 8, 2010, 12:33 UTC
- Message-ID
- <b0943d9e1001080433o553ffef7jd7d797c4f77da142@mail.gmail.com>
- In-Reply-To
- <b8197bcb1001072243h24e6248er79ac5a8afb6e3782@mail.gmail.com>
2010/1/8 Karl Wiberg <kha@treskal.com>:
Show 8 quoted lines
> On Thu, Jan 7, 2010 at 5:09 PM, Catalin Marinas <catalin.marinas@arm.com> wrote:
>
>> + if options.in_reply_to:
>> + cmd.append("--in-reply-to %s" % options.in_reply_to)
>
> Have you tested this? I'm pretty sure you need "--in-reply-to=%s", or
> to add the two strings separately---since as far as I can see, this
> command is never shell-expanded.I now tested it. I initially had an "=" before "%s" but dropped it because git help wasn't clear whether it's needed. See below for an updated patch:
Pass the --in-reply-to and --no-thread options to git send-email
From: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com> --- stgit/commands/mail.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index a78c9d2..287b6a4 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -241,6 +241,10 @@ def __send_message_git(msg, options): cmd.append("--suppress-cc=self") if not options.auto: cmd.append("--suppress-cc=body") + if options.in_reply_to: + cmd.extend(["--in-reply-to", options.in_reply_to]) + if options.no_thread: + cmd.append("--no-thread") # We only support To/Cc/Bcc in git send-email for now. for x in ['to', 'cc', 'bcc']: