{"thread":{"id":"29080","subject":"[PATCH, v4] git-tag: introduce --cleanup option","startedAt":"2011-12-04T04:20:26Z","lastAt":"2011-12-07T02:58:46Z","messageCount":7,"participants":["Kirill A. Shutemov","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":4,"patchTotal":null},"messages":[{"id":"180290","messageId":"1322972426-7591-1-git-send-email-kirill@shutemov.name","threadId":"29080","inReplyTo":null,"subject":"[PATCH, v4] git-tag: introduce --cleanup option","fromName":"Kirill A. Shutemov","fromEmail":"kirill@shutemov.name","sentAt":"2011-12-04T04:20:26Z","receivedAt":"2011-12-04T04:20:26Z","isPatch":true,"sender":{"key":"kirill@shutemov.name","avatar":"https://avatars.githubusercontent.com/u/588661?v=4"},"body":"From: \"Kirill A. Shutemov\" <kirill@shutemov.name>\n\nNormally git tag stripes tag message lines starting with '#', trailing\nspaces from every line and empty lines from the beginning and end.\n\n--cleanup allows to select different cleanup modes for tag message.\nIt provides the same interface as --cleanup option in git-commit.\n\nSigned-off-by: Kirill A. Shutemov <kirill@shutemov.name>\n---\n Documentation/git-tag.txt |   10 ++++++\n builtin/tag.c             |   69 +++++++++++++++++++++++++++++++++++---------\n 2 files changed, 65 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\nindex c83cb13..c2d73f3 100644\n--- a/Documentation/git-tag.txt\n+++ b/Documentation/git-tag.txt\n@@ -99,6 +99,16 @@ OPTIONS\n \tImplies `-a` if none of `-a`, `-s`, or `-u <key-id>`\n \tis given.\n \n+--cleanup=<mode>::\n+\tThis option sets how the tag message is cleaned up.\n+\tThe  '<mode>' can be one of 'verbatim', 'whitespace', 'strip',\n+\tand 'default'. The 'default' mode will strip leading and\n+\ttrailing empty lines and #commentary from the tag message\n+\tonly if the message is to be edited. Otherwise only whitespace\n+\tremoved. The 'verbatim' mode does not change message at all,\n+\t'whitespace' removes just leading/trailing whitespace lines\n+\tand 'strip' removes both whitespace and commentary.\n+\n <tagname>::\n \tThe name of the tag to create, delete, or describe.\n \tThe new tag name must pass all checks defined by\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 9b6fd95..27a66a3 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -268,6 +268,15 @@ static const char tag_template[] =\n \tN_(\"\\n\"\n \t\"#\\n\"\n \t\"# Write a tag message\\n\"\n+\t\"# Lines starting with '#' will be ignored.\\n\"\n+\t\"#\\n\");\n+\n+static const char tag_template_nocleanup[] =\n+\tN_(\"\\n\"\n+\t\"#\\n\"\n+\t\"# Write a tag message\\n\"\n+\t\"# Lines starting with '#' will be kept; you may remove them\"\n+\t\" yourself if you want to.\\n\"\n \t\"#\\n\");\n \n static void set_signingkey(const char *value)\n@@ -319,8 +328,18 @@ static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)\n \treturn 0;\n }\n \n+struct create_tag_options {\n+\tunsigned int message;\n+\tunsigned int sign;\n+\tenum {\n+\t\tCLEANUP_NONE,\n+\t\tCLEANUP_SPACE,\n+\t\tCLEANUP_ALL\n+\t} cleanup_mode;\n+};\n+\n static void create_tag(const unsigned char *object, const char *tag,\n-\t\t       struct strbuf *buf, int message, int sign,\n+\t\t       struct strbuf *buf, struct create_tag_options *opt,\n \t\t       unsigned char *prev, unsigned char *result)\n {\n \tenum object_type type;\n@@ -345,7 +364,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \tif (header_len > sizeof(header_buf) - 1)\n \t\tdie(_(\"tag header too big.\"));\n \n-\tif (!message) {\n+\tif (!opt->message) {\n \t\tint fd;\n \n \t\t/* write the template message before editing: */\n@@ -356,8 +375,12 @@ static void create_tag(const unsigned char *object, const char *tag,\n \n \t\tif (!is_null_sha1(prev))\n \t\t\twrite_tag_body(fd, prev);\n+\t\telse if (opt->cleanup_mode == CLEANUP_ALL)\n+\t\t\twrite_or_die(fd, _(tag_template),\n+\t\t\t\t\tstrlen(_(tag_template)));\n \t\telse\n-\t\t\twrite_or_die(fd, _(tag_template), strlen(_(tag_template)));\n+\t\t\twrite_or_die(fd, _(tag_template_nocleanup),\n+\t\t\t\t\tstrlen(_(tag_template_nocleanup)));\n \t\tclose(fd);\n \n \t\tif (launch_editor(path, buf, NULL)) {\n@@ -367,14 +390,15 @@ static void create_tag(const unsigned char *object, const char *tag,\n \t\t}\n \t}\n \n-\tstripspace(buf, 1);\n+\tif (opt->cleanup_mode != CLEANUP_NONE)\n+\t\tstripspace(buf, opt->cleanup_mode == CLEANUP_ALL);\n \n-\tif (!message && !buf->len)\n+\tif (opt->message && !buf->len)\n \t\tdie(_(\"no tag message?\"));\n \n \tstrbuf_insert(buf, 0, header_buf, header_len);\n \n-\tif (build_tag_object(buf, sign, result) < 0) {\n+\tif (build_tag_object(buf, opt->sign, result) < 0) {\n \t\tif (path)\n \t\t\tfprintf(stderr, _(\"The tag message has been left in %s\\n\"),\n \t\t\t\tpath);\n@@ -422,9 +446,10 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \tunsigned char object[20], prev[20];\n \tconst char *object_ref, *tag;\n \tstruct ref_lock *lock;\n-\n-\tint annotate = 0, sign = 0, force = 0, lines = -1,\n-\t\tlist = 0, delete = 0, verify = 0;\n+\tstruct create_tag_options opt;\n+\tchar *cleanup_arg = NULL;\n+\tint annotate = 0, force = 0, lines = -1, list = 0,\n+\t    delete = 0, verify = 0;\n \tconst char *msgfile = NULL, *keyid = NULL;\n \tstruct msg_arg msg = { 0, STRBUF_INIT };\n \tstruct commit_list *with_commit = NULL;\n@@ -442,7 +467,9 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tOPT_CALLBACK('m', \"message\", &msg, \"message\",\n \t\t\t     \"tag message\", parse_msg_arg),\n \t\tOPT_FILENAME('F', \"file\", &msgfile, \"read message from file\"),\n-\t\tOPT_BOOLEAN('s', \"sign\", &sign, \"annotated and GPG-signed tag\"),\n+\t\tOPT_BOOLEAN('s', \"sign\", &opt.sign, \"annotated and GPG-signed tag\"),\n+\t\tOPT_STRING(0, \"cleanup\", &cleanup_arg, \"default\",\n+\t\t\t\"how to strip spaces and #comments from message\"),\n \t\tOPT_STRING('u', \"local-user\", &keyid, \"key-id\",\n \t\t\t\t\t\"use another key to sign the tag\"),\n \t\tOPT__FORCE(&force, \"replace the tag if exists\"),\n@@ -459,13 +486,15 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_tag_config, NULL);\n \n+\topt.sign = 0;\n+\n \targc = parse_options(argc, argv, prefix, options, git_tag_usage, 0);\n \n \tif (keyid) {\n-\t\tsign = 1;\n+\t\topt.sign = 1;\n \t\tset_signingkey(keyid);\n \t}\n-\tif (sign)\n+\tif (opt.sign)\n \t\tannotate = 1;\n \tif (argc == 0 && !(delete || verify))\n \t\tlist = 1;\n@@ -523,9 +552,21 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \telse if (!force)\n \t\tdie(_(\"tag '%s' already exists\"), tag);\n \n+\topt.message = msg.given || msgfile;\n+\n+\tif (!cleanup_arg || !strcmp(cleanup_arg, \"default\"))\n+\t\topt.cleanup_mode = !opt.message ? CLEANUP_ALL : CLEANUP_SPACE;\n+\telse if (!strcmp(cleanup_arg, \"verbatim\"))\n+\t\topt.cleanup_mode = CLEANUP_NONE;\n+\telse if (!strcmp(cleanup_arg, \"whitespace\"))\n+\t\topt.cleanup_mode = CLEANUP_SPACE;\n+\telse if (!strcmp(cleanup_arg, \"strip\"))\n+\t\topt.cleanup_mode = CLEANUP_ALL;\n+\telse\n+\t\tdie(_(\"Invalid cleanup mode %s\"), cleanup_arg);\n+\n \tif (annotate)\n-\t\tcreate_tag(object, tag, &buf, msg.given || msgfile,\n-\t\t\t   sign, prev, object);\n+\t\tcreate_tag(object, tag, &buf, &opt, prev, object);\n \n \tlock = lock_any_ref_for_update(ref.buf, prev, 0);\n \tif (!lock)\n-- \n1.7.7.3\n"},{"id":"180317","messageId":"20111205215148.GA22663@sigill.intra.peff.net","threadId":"29080","inReplyTo":"1322972426-7591-1-git-send-email-kirill@shutemov.name","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-12-05T21:51:48Z","receivedAt":"2011-12-05T21:51:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 04, 2011 at 06:20:26AM +0200, Kirill A. Shutemov wrote:\n\n> From: \"Kirill A. Shutemov\" <kirill@shutemov.name>\n> \n> Normally git tag stripes tag message lines starting with '#', trailing\n> spaces from every line and empty lines from the beginning and end.\n\ns/stripes/strips\n\n> --cleanup allows to select different cleanup modes for tag message.\n> It provides the same interface as --cleanup option in git-commit.\n\nThanks, I think this is better, though it would be better still if they\ncould share the code. As a minor nit, I think the patch would be a\nlittle easier to read and review if you split the actual changes from\nthe refactoring to use the \"struct create_tag_options\".\n\nMore importantly, though, this seems to break t6300 badly. I haven't\nlooked into why yet, though.\n\n-Peff\n"},{"id":"180318","messageId":"20111205222724.GA7603@sigill.intra.peff.net","threadId":"29080","inReplyTo":"1322972426-7591-1-git-send-email-kirill@shutemov.name","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-12-05T22:27:24Z","receivedAt":"2011-12-05T22:27:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 04, 2011 at 06:20:26AM +0200, Kirill A. Shutemov wrote:\n\n> @@ -367,14 +390,15 @@ static void create_tag(const unsigned char *object, const char *tag,\n> [...]\n> -\tif (!message && !buf->len)\n> +\tif (opt->message && !buf->len)\n>  \t\tdie(_(\"no tag message?\"));\n\nAh, this is the hunk that causes t6300 to fail. You accidentally removed\nthe negation when converting the \"message\" flag over.\n\nThis was much easier to find by splitting the refactoring (where the bug\nis) away from the new feature (which is where I assumed the bug was).\nHere's the first half of the \"split\". You can rebase your original patch\non top to get the second half.\n\nI also looked at factoring out the \"which cleanup mode to select\" logic\nfrom builtin/commit.c, but it turned out to just make things harder to\nfollow.\n\n-- >8 --\nFrom: \"Kirill A. Shutemov\" <kirill@shutemov.name>\nSubject: [PATCH] tag: refactor passing tag creation options\n\nRather than continually adding parameters to the create_tag\nfunction, we can put all of the flags in a struct.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nActually, I'm not sure this really buys us much as a refactoring. It\nsaves a parameter in the function, but it's not like we end up passing\nall those parameters to sub-functions, where something like this would\nincrease readability. I'm fine with this, but I'd also be fine with just\ndropping this half and passing the cleanup_mode parameter directly.\n\n builtin/tag.c |   32 ++++++++++++++++++++------------\n 1 files changed, 20 insertions(+), 12 deletions(-)\n\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 9b6fd95..e5bd708 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -319,8 +319,13 @@ static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)\n \treturn 0;\n }\n \n+struct create_tag_options {\n+\tunsigned int message;\n+\tunsigned int sign;\n+};\n+\n static void create_tag(const unsigned char *object, const char *tag,\n-\t\t       struct strbuf *buf, int message, int sign,\n+\t\t       struct strbuf *buf, struct create_tag_options *opt,\n \t\t       unsigned char *prev, unsigned char *result)\n {\n \tenum object_type type;\n@@ -345,7 +350,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \tif (header_len > sizeof(header_buf) - 1)\n \t\tdie(_(\"tag header too big.\"));\n \n-\tif (!message) {\n+\tif (!opt->message) {\n \t\tint fd;\n \n \t\t/* write the template message before editing: */\n@@ -369,12 +374,12 @@ static void create_tag(const unsigned char *object, const char *tag,\n \n \tstripspace(buf, 1);\n \n-\tif (!message && !buf->len)\n+\tif (!opt->message && !buf->len)\n \t\tdie(_(\"no tag message?\"));\n \n \tstrbuf_insert(buf, 0, header_buf, header_len);\n \n-\tif (build_tag_object(buf, sign, result) < 0) {\n+\tif (build_tag_object(buf, opt->sign, result) < 0) {\n \t\tif (path)\n \t\t\tfprintf(stderr, _(\"The tag message has been left in %s\\n\"),\n \t\t\t\tpath);\n@@ -422,9 +427,9 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \tunsigned char object[20], prev[20];\n \tconst char *object_ref, *tag;\n \tstruct ref_lock *lock;\n-\n-\tint annotate = 0, sign = 0, force = 0, lines = -1,\n-\t\tlist = 0, delete = 0, verify = 0;\n+\tstruct create_tag_options opt;\n+\tint annotate = 0, force = 0, lines = -1, list = 0,\n+\t    delete = 0, verify = 0;\n \tconst char *msgfile = NULL, *keyid = NULL;\n \tstruct msg_arg msg = { 0, STRBUF_INIT };\n \tstruct commit_list *with_commit = NULL;\n@@ -442,7 +447,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \t\tOPT_CALLBACK('m', \"message\", &msg, \"message\",\n \t\t\t     \"tag message\", parse_msg_arg),\n \t\tOPT_FILENAME('F', \"file\", &msgfile, \"read message from file\"),\n-\t\tOPT_BOOLEAN('s', \"sign\", &sign, \"annotated and GPG-signed tag\"),\n+\t\tOPT_BOOLEAN('s', \"sign\", &opt.sign, \"annotated and GPG-signed tag\"),\n \t\tOPT_STRING('u', \"local-user\", &keyid, \"key-id\",\n \t\t\t\t\t\"use another key to sign the tag\"),\n \t\tOPT__FORCE(&force, \"replace the tag if exists\"),\n@@ -459,13 +464,15 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_tag_config, NULL);\n \n+\topt.sign = 0;\n+\n \targc = parse_options(argc, argv, prefix, options, git_tag_usage, 0);\n \n \tif (keyid) {\n-\t\tsign = 1;\n+\t\topt.sign = 1;\n \t\tset_signingkey(keyid);\n \t}\n-\tif (sign)\n+\tif (opt.sign)\n \t\tannotate = 1;\n \tif (argc == 0 && !(delete || verify))\n \t\tlist = 1;\n@@ -523,9 +530,10 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \telse if (!force)\n \t\tdie(_(\"tag '%s' already exists\"), tag);\n \n+\topt.message = msg.given || msgfile;\n+\n \tif (annotate)\n-\t\tcreate_tag(object, tag, &buf, msg.given || msgfile,\n-\t\t\t   sign, prev, object);\n+\t\tcreate_tag(object, tag, &buf, &opt, prev, object);\n \n \tlock = lock_any_ref_for_update(ref.buf, prev, 0);\n \tif (!lock)\n-- \n1.7.8.rc4.4.g884ec\n"},{"id":"180319","messageId":"20111205222915.GA7644@sigill.intra.peff.net","threadId":"29080","inReplyTo":"20111205222724.GA7603@sigill.intra.peff.net","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-12-05T22:29:15Z","receivedAt":"2011-12-05T22:29:15Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Dec 05, 2011 at 05:27:24PM -0500, Jeff King wrote:\n\n> I also looked at factoring out the \"which cleanup mode to select\" logic\n> from builtin/commit.c, but it turned out to just make things harder to\n> follow.\n\nWhile I was doing that, I also noticed this minor fix:\n\n-- >8 --\nSubject: [PATCH] stripspace: fix outdated comment\n\nThe comment on top of stripspace() claims that the buffer\nwill no longer be NUL-terminated. However, this has not been\nthe case at least since the move to using strbuf in 2007.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n builtin/stripspace.c |    2 --\n 1 files changed, 0 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/stripspace.c b/builtin/stripspace.c\nindex 4d3b93f..1288ffc 100644\n--- a/builtin/stripspace.c\n+++ b/builtin/stripspace.c\n@@ -22,8 +22,6 @@ static size_t cleanup(char *line, size_t len)\n  * Remove empty lines from the beginning and end\n  * and also trailing spaces from every line.\n  *\n- * Note that the buffer will not be NUL-terminated.\n- *\n  * Turn multiple consecutive empty lines between paragraphs\n  * into just one empty line.\n  *\n-- \n1.7.8.rc4.4.g884ec\n"},{"id":"180320","messageId":"7v39cylkib.fsf@alter.siamese.dyndns.org","threadId":"29080","inReplyTo":"20111205215148.GA22663@sigill.intra.peff.net","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-12-05T22:30:04Z","receivedAt":"2011-12-05T22:30:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> More importantly, though, this seems to break t6300 badly. I haven't\n> looked into why yet, though.\n\nAlso breaks 7004 which is _about_ tags.\n\nRolling a broken patch in quick succession to v4 without ever running\ntests (and not adding new test pieces to protect new feature) is not a\nvery productive way to use the reviewer bandwidth on this list.\n"},{"id":"180322","messageId":"7vvcpuk5ex.fsf@alter.siamese.dyndns.org","threadId":"29080","inReplyTo":"20111205215148.GA22663@sigill.intra.peff.net","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-12-05T22:41:26Z","receivedAt":"2011-12-05T22:41:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> More importantly, though, this seems to break t6300 badly. I haven't\n> looked into why yet, though.\n\nProbably two issues.\n\n - opt.message (and the original 'message') was misnamed and confused the\n   patch author what \"if (!message && !buf->len)\" meant.\n\n - \"opt\" is a structure meant to be extensible, but is not initialized as\n   a whole, inviting future errors.\n\nIt still seems to be broken with respect to the primary thing the patch\nwanted to do (t7400 \"git tag -F commentsfile comments-annotated-tag\" does\nnot seem to produce an expected result), so I'll kick it back to the\nKirill to look at.\n\nThanks.\n\n builtin/tag.c |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 27a66a3..7883720 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -329,7 +329,7 @@ static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)\n }\n \n struct create_tag_options {\n-\tunsigned int message;\n+\tunsigned int message_given:1;\n \tunsigned int sign;\n \tenum {\n \t\tCLEANUP_NONE,\n@@ -364,7 +364,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \tif (header_len > sizeof(header_buf) - 1)\n \t\tdie(_(\"tag header too big.\"));\n \n-\tif (!opt->message) {\n+\tif (!opt->message_given) {\n \t\tint fd;\n \n \t\t/* write the template message before editing: */\n@@ -393,7 +393,7 @@ static void create_tag(const unsigned char *object, const char *tag,\n \tif (opt->cleanup_mode != CLEANUP_NONE)\n \t\tstripspace(buf, opt->cleanup_mode == CLEANUP_ALL);\n \n-\tif (opt->message && !buf->len)\n+\tif (!opt->message_given && !buf->len)\n \t\tdie(_(\"no tag message?\"));\n \n \tstrbuf_insert(buf, 0, header_buf, header_len);\n@@ -486,7 +486,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \n \tgit_config(git_tag_config, NULL);\n \n-\topt.sign = 0;\n+\tmemset(&opt, 0, sizeof(opt));\n \n \targc = parse_options(argc, argv, prefix, options, git_tag_usage, 0);\n \n@@ -552,10 +552,10 @@ int cmd_tag(int argc, const char **argv, const char *prefix)\n \telse if (!force)\n \t\tdie(_(\"tag '%s' already exists\"), tag);\n \n-\topt.message = msg.given || msgfile;\n+\topt.message_given = msg.given || msgfile;\n \n \tif (!cleanup_arg || !strcmp(cleanup_arg, \"default\"))\n-\t\topt.cleanup_mode = !opt.message ? CLEANUP_ALL : CLEANUP_SPACE;\n+\t\topt.cleanup_mode = !opt.message_given ? CLEANUP_ALL : CLEANUP_SPACE;\n \telse if (!strcmp(cleanup_arg, \"verbatim\"))\n \t\topt.cleanup_mode = CLEANUP_NONE;\n \telse if (!strcmp(cleanup_arg, \"whitespace\"))\n"},{"id":"180442","messageId":"20111207025837.GA31369@shutemov.name","threadId":"29080","inReplyTo":"7vvcpuk5ex.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH, v4] git-tag: introduce --cleanup option","fromName":"Kirill A. Shutemov","fromEmail":"kirill@shutemov.name","sentAt":"2011-12-07T02:58:46Z","receivedAt":"2011-12-07T02:58:46Z","isPatch":true,"sender":{"key":"kirill@shutemov.name","avatar":"https://avatars.githubusercontent.com/u/588661?v=4"},"body":"On Mon, Dec 05, 2011 at 02:41:26PM -0800, Junio C Hamano wrote:\n> Jeff King <peff@peff.net> writes:\n> \n> > More importantly, though, this seems to break t6300 badly. I haven't\n> > looked into why yet, though.\n> \n> Probably two issues.\n> \n>  - opt.message (and the original 'message') was misnamed and confused the\n>    patch author what \"if (!message && !buf->len)\" meant.\n> \n>  - \"opt\" is a structure meant to be extensible, but is not initialized as\n>    a whole, inviting future errors.\n\nSorry for that and thanks for the investigation.\n\n> It still seems to be broken with respect to the primary thing the patch\n> wanted to do (t7400 \"git tag -F commentsfile comments-annotated-tag\" does\n> not seem to produce an expected result), so I'll kick it back to the\n> Kirill to look at.\n\nCLEANUP_ALL should always be default regardless of opt.message_given.\n\nI'll send new version.\n\n-- \n Kirill A. Shutemov\n"}]}