{"thread":{"id":"3379","subject":"[PATCH] git-rev-parse: Fix --short= option parsing","startedAt":"2006-02-18T01:10:53Z","lastAt":"2006-02-18T15:07:09Z","messageCount":3,"participants":["Jonas Fonseca","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16351","messageId":"20060218011053.GB2562@diku.dk","threadId":"3379","inReplyTo":null,"subject":"[PATCH] git-rev-parse: Fix --short= option parsing","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2006-02-18T01:10:53Z","receivedAt":"2006-02-18T01:10:53Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Signed-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n---\ncommit 16e2efc524d181cf46dcb252532139a0aff4a28f\ntree c57ea8bf09b25fb643aadd224e7e73673187cc60\nparent b867c7c23a42fbe9f261153a9814a5efbc071a29\nauthor Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:04:26 +0100\ncommitter Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:04:26 +0100\n\n rev-parse.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/rev-parse.c b/rev-parse.c\nindex b82f294..70a8271 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -225,12 +225,12 @@ int main(int argc, char **argv)\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (!strcmp(arg, \"--short\") ||\n-\t\t\t    !strncmp(arg, \"--short=\", 9)) {\n+\t\t\t    !strncmp(arg, \"--short=\", 8)) {\n \t\t\t\tfilter &= ~(DO_FLAGS|DO_NOREV);\n \t\t\t\tverify = 1;\n \t\t\t\tabbrev = DEFAULT_ABBREV;\n-\t\t\t\tif (arg[8] == '=')\n-\t\t\t\t\tabbrev = strtoul(arg + 9, NULL, 10);\n+\t\t\t\tif (arg[7] == '=')\n+\t\t\t\t\tabbrev = strtoul(arg + 8, NULL, 10);\n \t\t\t\tif (abbrev < MINIMUM_ABBREV)\n \t\t\t\t\tabbrev = MINIMUM_ABBREV;\n \t\t\t\telse if (40 <= abbrev)\n\n-- \nJonas Fonseca\n"},{"id":"16362","messageId":"7v7j7tupn7.fsf@assigned-by-dhcp.cox.net","threadId":"3379","inReplyTo":"20060218011053.GB2562@diku.dk","subject":"Re: [PATCH] git-rev-parse: Fix --short= option parsing","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-18T06:50:20Z","receivedAt":"2006-02-18T06:50:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  I queued the two fixes from you.\n\nThey will first appear in \"next\" and also in 1.2.2.\n\n> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>\n>\n> ---\n> commit 013b99654ee464856d266a72f0203d0fee2b0d11\n> tree 3c961d6ebb8b9805ee3950ec081679de15f5a9ba\n> parent 16e2efc524d181cf46dcb252532139a0aff4a28f\n> author Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:05:11 +0100\n> committer Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:05:11 +0100\n\nBTW, what git-based tool do you use to spit out this ugly format?\nFull object name of the parent commit is useful only if the\nrecipient has that object, and it is not one of mine, so it is\nunlikely nobody but you would have it.  Name of the tree is what\nyou would get _after_ applying this patch, so it also is not\nvery useful for e-mail communication.\n"},{"id":"16387","messageId":"20060218150709.GA16846@diku.dk","threadId":"3379","inReplyTo":"7v7j7tupn7.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-rev-parse: Fix --short= option parsing","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2006-02-18T15:07:09Z","receivedAt":"2006-02-18T15:07:09Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Junio C Hamano <junkio@cox.net> wrote Fri, Feb 17, 2006:\n> > Signed-off-by: Jonas Fonseca <fonseca@diku.dk>\n> >\n> > ---\n> > commit 013b99654ee464856d266a72f0203d0fee2b0d11\n> > tree 3c961d6ebb8b9805ee3950ec081679de15f5a9ba\n> > parent 16e2efc524d181cf46dcb252532139a0aff4a28f\n> > author Jonas Fonseca <fonseca@diku.dk> Sat, 18 Feb 2006 02:05:11 +0100\n> > committer Jonas Fonseca <fonseca@antimatter.localdomain> Sat, 18 Feb 2006 02:05:11 +0100\n> \n> BTW, what git-based tool do you use to spit out this ugly format?\n\nCogito.\n\n> Full object name of the parent commit is useful only if the\n> recipient has that object, and it is not one of mine, so it is\n> unlikely nobody but you would have it.  Name of the tree is what\n> you would get _after_ applying this patch, so it also is not\n> very useful for e-mail communication.\n\nI agree most of this is useless and will look into making a patch to so\nCogito will also use the more or less standard From and Date headers\nwith parent prefixed to the diff.\n\n-- \nJonas Fonseca\n"}]}