summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc35de8)
raw | patch | inline | side by side (parent: cc35de8)
author | Josh Triplett <josht@us.ibm.com> | |
Sat, 15 Jul 2006 00:49:08 +0000 (17:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 15 Jul 2006 03:41:37 +0000 (20:41 -0700) |
Add the --in-reply-to option to provide a Message-Id for an initial
In-Reply-To/References header, useful for including a new patch series as part
of an existing thread.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
In-Reply-To/References header, useful for including a new patch series as part
of an existing thread.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-format-patch.txt | patch | blob | history | |
builtin-log.c | patch | blob | history |
index 305bd79154fabea871419ab56b4a6f01f58b6a57..67425dc0359ee9774200e1a2e12913d570117e7c 100644 (file)
[verse]
'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]
[-s | --signoff] [--diff-options] [--start-number <n>]
+ [--in-reply-to=Message-Id]
<since>[..<until>]
DESCRIPTION
subsequent mails appear as replies to the first. Also generates
the Message-Id header to reference.
+--in-reply-to=Message-Id::
+ Make the first mail (or all the mails with --no-thread) appear as a
+ reply to the given Message-Id, which avoids breaking threads to
+ provide a new patch series.
+
CONFIGURATION
-------------
You can specify extra mail header lines to be added to each
diff --git a/builtin-log.c b/builtin-log.c
index 6466768051038ac7cbd77deb8c5b5b6e3456fd02..705205331e5259a1dd643517d0d2983b426e1051 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
int keep_subject = 0;
int ignore_if_in_upstream = 0;
int thread = 0;
+ char *in_reply_to = NULL;
struct diff_options patch_id_opts;
char *add_signoff = NULL;
char message_id[1024];
ignore_if_in_upstream = 1;
else if (!strcmp(argv[i], "--thread"))
thread = 1;
+ else if (!strncmp(argv[i], "--in-reply-to=", 14))
+ in_reply_to = argv[i] + 14;
+ else if (!strcmp(argv[i], "--in-reply-to")) {
+ i++;
+ if (i == argc)
+ die("Need a Message-Id for --in-reply-to");
+ in_reply_to = argv[i];
+ }
else
argv[j++] = argv[i];
}
if (numbered)
rev.total = total + start_number - 1;
rev.add_signoff = add_signoff;
+ rev.ref_message_id = in_reply_to;
while (0 <= --nr) {
int shown;
commit = list[nr];