{"thread":{"id":"23770","subject":"[PATCH 0/8] merge: allow --log to append shortlog to -m","startedAt":"2010-05-10T17:17:44Z","lastAt":"2010-05-10T17:17:52Z","messageCount":9,"participants":["Tay Ray Chuan"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"141414","messageId":"1273511872-4924-1-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":null,"subject":"[PATCH 0/8] merge: allow --log to append shortlog to -m","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:44Z","receivedAt":"2010-05-10T17:17:44Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Previously, --log didn't have any effect if a message was specified\nwith -m. This allows one to create commit messages like:\n\n  Merge in new feature\n\n  * commit c2:\n    c2's message\n\nContents:\n[PATCH 1/8] t7604-merge-custom-message: shift expected output creation\n[PATCH 2/8] t7604-merge-custom-message: show that --log doesn't append to -m\n[PATCH 3/8] merge: update comment\n[PATCH 4/8] merge: rename variable\n[PATCH 5/8] fmt-merge-msg: minor refactor of fmt_merge_msg()\n[PATCH 6/8] fmt-merge-msg: refactor merge title formatting\n[PATCH 7/8] fmt-merge-msg: add function to append shortlog only\n[PATCH 8/8] merge: --log appends shortlog to message if specified\n\n Documentation/git-merge.txt     |    7 +++-\n builtin.h                       |    1 +\n builtin/fmt-merge-msg.c         |   76 ++++++++++++++++++++++++--------------\n builtin/merge.c                 |   20 ++++++----\n t/t7604-merge-custom-message.sh |   24 ++++++++++--\n 5 files changed, 87 insertions(+), 41 deletions(-)\n"},{"id":"141416","messageId":"1273511872-4924-2-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 1/8] t7604-merge-custom-message: shift expected output creation","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:45Z","receivedAt":"2010-05-10T17:17:45Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Squash in a minor rename too.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n t/t7604-merge-custom-message.sh |   12 ++++++++----\n 1 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex 269cfdf..d79542d 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -6,6 +6,10 @@ Testing merge when using a custom message for the merge commit.'\n \n . ./test-lib.sh\n \n+create_merge_msgs() {\n+\techo >exp.subject \"custom message\"\n+}\n+\n test_expect_success 'setup' '\n \techo c0 > c0.c &&\n \tgit add c0.c &&\n@@ -19,16 +23,16 @@ test_expect_success 'setup' '\n \techo c2 > c2.c &&\n \tgit add c2.c &&\n \tgit commit -m c2 &&\n-\tgit tag c2\n+\tgit tag c2 &&\n+\tcreate_merge_msgs\n '\n \n \n test_expect_success 'merge c2 with a custom message' '\n \tgit reset --hard c1 &&\n-\techo >expected \"custom message\" &&\n-\tgit merge -m \"custom message\" c2 &&\n+\tgit merge -m \"$(cat exp.subject)\" c2 &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n-\ttest_cmp expected actual\n+\ttest_cmp exp.subject actual\n '\n \n test_done\n-- \n1.7.1.189.g07419\n"},{"id":"141415","messageId":"1273511872-4924-3-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 2/8] t7604-merge-custom-message: show that --log doesn't append to -m","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:46Z","receivedAt":"2010-05-10T17:17:46Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n t/t7604-merge-custom-message.sh |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex d79542d..af53df1 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -8,6 +8,11 @@ Testing merge when using a custom message for the merge commit.'\n \n create_merge_msgs() {\n \techo >exp.subject \"custom message\"\n+\n+\tcp exp.subject exp.log &&\n+\techo >>exp.log \"\" &&\n+\techo >>exp.log \"* commit 'c2':\" &&\n+\techo >>exp.log \"  c2\"\n }\n \n test_expect_success 'setup' '\n@@ -35,4 +40,11 @@ test_expect_success 'merge c2 with a custom message' '\n \ttest_cmp exp.subject actual\n '\n \n+test_expect_failure 'merge --log appends to custom message' '\n+\tgit reset --hard c1 &&\n+\tgit merge --log -m \"$(cat exp.subject)\" c2 &&\n+\tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n+\ttest_cmp exp.log actual\n+'\n+\n test_done\n-- \n1.7.1.189.g07419\n"},{"id":"141417","messageId":"1273511872-4924-4-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 3/8] merge: update comment","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:47Z","receivedAt":"2010-05-10T17:17:47Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"ce9d823 (merge: do not add standard message when message is given with\n-m option) changed the behaviour of the code that the comment addressed,\nbut the comment was not similarly updated.\n\nFix this.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n builtin/merge.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 37d414b..c2691e8 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -990,7 +990,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t/*\n \t\t * All the rest are the commits being merged;\n \t\t * prepare the standard merge summary message to\n-\t\t * be appended to the given message.  If remote\n+\t\t * used as the merge message.  If remote\n \t\t * is invalid we will die later in the common\n \t\t * codepath so we discard the error in this\n \t\t * loop.\n-- \n1.7.1.189.g07419\n"},{"id":"141421","messageId":"1273511872-4924-5-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 4/8] merge: rename variable","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:48Z","receivedAt":"2010-05-10T17:17:48Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"It is more accurate to call it 'merge_names' instead of 'msg', as it\ndoes not contain the final message.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n builtin/merge.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex c2691e8..bc7e5e7 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -982,7 +982,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\treset_hard(remote_head->sha1, 0);\n \t\treturn 0;\n \t} else {\n-\t\tstruct strbuf msg = STRBUF_INIT;\n+\t\tstruct strbuf merge_names = STRBUF_INIT;\n \n \t\t/* We are invoked directly as the first-class UI. */\n \t\thead_arg = \"HEAD\";\n@@ -997,8 +997,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t */\n \t\tif (!have_message) {\n \t\t\tfor (i = 0; i < argc; i++)\n-\t\t\t\tmerge_name(argv[i], &msg);\n-\t\t\tfmt_merge_msg(option_log, &msg, &merge_msg);\n+\t\t\t\tmerge_name(argv[i], &merge_names);\n+\t\t\tfmt_merge_msg(option_log, &merge_names, &merge_msg);\n \t\t\tif (merge_msg.len)\n \t\t\t\tstrbuf_setlen(&merge_msg, merge_msg.len-1);\n \t\t}\n-- \n1.7.1.189.g07419\n"},{"id":"141419","messageId":"1273511872-4924-6-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 5/8] fmt-merge-msg: minor refactor of fmt_merge_msg()","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:49Z","receivedAt":"2010-05-10T17:17:49Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Shift implementation into a private function, do_fmt_merge_msg(). This\nallows for further changes to the implementation, without affecting the\ninterface.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n builtin/fmt-merge-msg.c |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 379a031..a2bccd6 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -202,7 +202,8 @@ static void shortlog(const char *name, unsigned char *sha1,\n \tstring_list_clear(&subjects, 0);\n }\n \n-int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {\n+static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n+\tstruct strbuf *out) {\n \tint limit = 20, i = 0, pos = 0;\n \tchar *sep = \"\";\n \tunsigned char head_sha1[20];\n@@ -296,6 +297,10 @@ int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {\n \treturn 0;\n }\n \n+int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {\n+\treturn do_fmt_merge_msg(merge_summary, in, out);\n+}\n+\n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n {\n \tconst char *inpath = NULL;\n-- \n1.7.1.189.g07419\n"},{"id":"141422","messageId":"1273511872-4924-7-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 6/8] fmt-merge-msg: refactor merge title formatting","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:50Z","receivedAt":"2010-05-10T17:17:50Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n builtin/fmt-merge-msg.c |   65 ++++++++++++++++++++++++++---------------------\n 1 files changed, 36 insertions(+), 29 deletions(-)\n\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex a2bccd6..d0160cb 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -202,36 +202,10 @@ static void shortlog(const char *name, unsigned char *sha1,\n \tstring_list_clear(&subjects, 0);\n }\n \n-static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n-\tstruct strbuf *out) {\n-\tint limit = 20, i = 0, pos = 0;\n+static void do_fmt_merge_msg_title(struct strbuf *out,\n+\tconst char *current_branch) {\n+\tint i = 0;\n \tchar *sep = \"\";\n-\tunsigned char head_sha1[20];\n-\tconst char *current_branch;\n-\n-\t/* get current branch */\n-\tcurrent_branch = resolve_ref(\"HEAD\", head_sha1, 1, NULL);\n-\tif (!current_branch)\n-\t\tdie(\"No current branch\");\n-\tif (!prefixcmp(current_branch, \"refs/heads/\"))\n-\t\tcurrent_branch += 11;\n-\n-\t/* get a line */\n-\twhile (pos < in->len) {\n-\t\tint len;\n-\t\tchar *newline, *p = in->buf + pos;\n-\n-\t\tnewline = strchr(p, '\\n');\n-\t\tlen = newline ? newline - p : strlen(p);\n-\t\tpos += len + !!newline;\n-\t\ti++;\n-\t\tp[len] = 0;\n-\t\tif (handle_line(p))\n-\t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n-\t}\n-\n-\tif (!srcs.nr)\n-\t\treturn 0;\n \n \tstrbuf_addstr(out, \"Merge \");\n \tfor (i = 0; i < srcs.nr; i++) {\n@@ -279,6 +253,39 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n \t\tstrbuf_addch(out, '\\n');\n \telse\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n+}\n+\n+static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n+\tstruct strbuf *out) {\n+\tint limit = 20, i = 0, pos = 0;\n+\tunsigned char head_sha1[20];\n+\tconst char *current_branch;\n+\n+\t/* get current branch */\n+\tcurrent_branch = resolve_ref(\"HEAD\", head_sha1, 1, NULL);\n+\tif (!current_branch)\n+\t\tdie(\"No current branch\");\n+\tif (!prefixcmp(current_branch, \"refs/heads/\"))\n+\t\tcurrent_branch += 11;\n+\n+\t/* get a line */\n+\twhile (pos < in->len) {\n+\t\tint len;\n+\t\tchar *newline, *p = in->buf + pos;\n+\n+\t\tnewline = strchr(p, '\\n');\n+\t\tlen = newline ? newline - p : strlen(p);\n+\t\tpos += len + !!newline;\n+\t\ti++;\n+\t\tp[len] = 0;\n+\t\tif (handle_line(p))\n+\t\t\tdie (\"Error in line %d: %.*s\", i, len, p);\n+\t}\n+\n+\tif (!srcs.nr)\n+\t\treturn 0;\n+\n+\tdo_fmt_merge_msg_title(out, current_branch);\n \n \tif (merge_summary) {\n \t\tstruct commit *head;\n-- \n1.7.1.189.g07419\n"},{"id":"141420","messageId":"1273511872-4924-8-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 7/8] fmt-merge-msg: add function to append shortlog only","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:51Z","receivedAt":"2010-05-10T17:17:51Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n builtin.h               |    1 +\n builtin/fmt-merge-msg.c |   13 +++++++++----\n 2 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin.h b/builtin.h\nindex 5c887ef..b614d12 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -16,6 +16,7 @@ extern const char *help_unknown_cmd(const char *cmd);\n extern void prune_packed_objects(int);\n extern int fmt_merge_msg(int merge_summary, struct strbuf *in,\n \tstruct strbuf *out);\n+extern int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out);\n extern int commit_notes(struct notes_tree *t, const char *msg);\n \n struct notes_rewrite_cfg {\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex d0160cb..48548cf 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -255,8 +255,8 @@ static void do_fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n-static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n-\tstruct strbuf *out) {\n+static int do_fmt_merge_msg(int merge_title, int merge_summary,\n+\tstruct strbuf *in, struct strbuf *out) {\n \tint limit = 20, i = 0, pos = 0;\n \tunsigned char head_sha1[20];\n \tconst char *current_branch;\n@@ -285,7 +285,8 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n \tif (!srcs.nr)\n \t\treturn 0;\n \n-\tdo_fmt_merge_msg_title(out, current_branch);\n+\tif (merge_title)\n+\t\tdo_fmt_merge_msg_title(out, current_branch);\n \n \tif (merge_summary) {\n \t\tstruct commit *head;\n@@ -305,7 +306,11 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n }\n \n int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {\n-\treturn do_fmt_merge_msg(merge_summary, in, out);\n+\treturn do_fmt_merge_msg(1, merge_summary, in, out);\n+}\n+\n+int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out) {\n+\treturn do_fmt_merge_msg(0, 1, in, out);\n }\n \n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n-- \n1.7.1.189.g07419\n"},{"id":"141418","messageId":"1273511872-4924-9-git-send-email-rctay89@gmail.com","threadId":"23770","inReplyTo":"1273511872-4924-1-git-send-email-rctay89@gmail.com","subject":"[PATCH 8/8] merge: --log appends shortlog to message if specified","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-05-10T17:17:52Z","receivedAt":"2010-05-10T17:17:52Z","isPatch":true,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"When the user specifies a message, use fmt_merge_msg_shortlog() to\nappend the shortlog.\n\nPreviously, when a message was specified, we ignored the merge title\n(\"Merge <foo> into <bar>\") and shortlog from fmt_merge_msg().\n\nUpdate the documentation for -m to reflect this too.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\n---\n Documentation/git-merge.txt     |    7 ++++++-\n builtin/fmt-merge-msg.c         |    3 +++\n builtin/merge.c                 |   18 +++++++++++-------\n t/t7604-merge-custom-message.sh |    2 +-\n 4 files changed, 21 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex c2325ef..84043cc 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -58,7 +58,12 @@ include::merge-options.txt[]\n \n -m <msg>::\n \tSet the commit message to be used for the merge commit (in\n-\tcase one is created). The 'git fmt-merge-msg' command can be\n+\tcase one is created).\n+\n+\tIf `--log` is specified, a shortlog of the commits being merged\n+\twill be appended to the specified message.\n+\n+\tThe 'git fmt-merge-msg' command can be\n \tused to give a good default for automated 'git merge'\n \tinvocations.\n \ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex 48548cf..4420425 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -298,6 +298,9 @@ static int do_fmt_merge_msg(int merge_title, int merge_summary,\n \t\trev.ignore_merges = 1;\n \t\trev.limited = 1;\n \n+\t\tif (suffixcmp(out->buf, \"\\n\"))\n+\t\t\tstrbuf_addch(out, '\\n');\n+\n \t\tfor (i = 0; i < origins.nr; i++)\n \t\t\tshortlog(origins.items[i].string, origins.items[i].util,\n \t\t\t\t\thead, &rev, limit, out);\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex bc7e5e7..37ce4f5 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -990,18 +990,22 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t\t/*\n \t\t * All the rest are the commits being merged;\n \t\t * prepare the standard merge summary message to\n-\t\t * used as the merge message.  If remote\n+\t\t * be appended to the given message.  If remote\n \t\t * is invalid we will die later in the common\n \t\t * codepath so we discard the error in this\n \t\t * loop.\n \t\t */\n-\t\tif (!have_message) {\n-\t\t\tfor (i = 0; i < argc; i++)\n-\t\t\t\tmerge_name(argv[i], &merge_names);\n+\t\tfor (i = 0; i < argc; i++)\n+\t\t\tmerge_name(argv[i], &merge_names);\n+\n+\t\tif (have_message && option_log)\n+\t\t\tfmt_merge_msg_shortlog(&merge_names, &merge_msg);\n+\t\telse if (!have_message)\n \t\t\tfmt_merge_msg(option_log, &merge_names, &merge_msg);\n-\t\t\tif (merge_msg.len)\n-\t\t\t\tstrbuf_setlen(&merge_msg, merge_msg.len-1);\n-\t\t}\n+\n+\n+\t\tif (!(have_message && !option_log) && merge_msg.len)\n+\t\t\tstrbuf_setlen(&merge_msg, merge_msg.len-1);\n \t}\n \n \tif (head_invalid || !argc)\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex af53df1..9114785 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -40,7 +40,7 @@ test_expect_success 'merge c2 with a custom message' '\n \ttest_cmp exp.subject actual\n '\n \n-test_expect_failure 'merge --log appends to custom message' '\n+test_expect_success 'merge --log appends to custom message' '\n \tgit reset --hard c1 &&\n \tgit merge --log -m \"$(cat exp.subject)\" c2 &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n-- \n1.7.1.189.g07419\n"}]}