diff options
author | Josh Triplett <josht@us.ibm.com> | 2006-07-14 17:49:08 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-14 20:41:37 -0700 |
commit | da56645dd7c1175fc2ed1628ac35fdd35e705641 (patch) | |
tree | 51cb90e5a5e82a0ed7e535d086a2b9468106b8ab /builtin-log.c | |
parent | cc35de8470541e389b7d2bdda4c901574720fa81 (diff) | |
download | git-da56645dd7c1175fc2ed1628ac35fdd35e705641.tar.gz git-da56645dd7c1175fc2ed1628ac35fdd35e705641.tar.xz |
Add option to set initial In-Reply-To/References
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c index 646676805..705205331 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -249,6 +249,7 @@ int cmd_format_patch(int argc, const char **argv, char **envp) 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]; @@ -320,6 +321,14 @@ int cmd_format_patch(int argc, const char **argv, char **envp) 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]; } @@ -377,6 +386,7 @@ int cmd_format_patch(int argc, const char **argv, char **envp) 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]; |