{"thread":{"id":"11347","subject":"[PATCH] git show <tag>: show the tagger","startedAt":"2007-12-18T18:01:33Z","lastAt":"2007-12-19T09:11:16Z","messageCount":4,"participants":["Johannes Schindelin","Junio C Hamano","Jakub Narebski","Andreas Ericsson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63650","messageId":"Pine.LNX.4.64.0712181800250.23902@racer.site","threadId":"11347","inReplyTo":null,"subject":"[PATCH] git show <tag>: show the tagger","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-18T18:01:33Z","receivedAt":"2007-12-18T18:01:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nFor commit objects, the Author is shown, so do the equivalent for\ntag objects, too.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tI know, it's feature freeze period.  But this is arguably a \n\tusability bug.\n\n\tWell, it's not _that_ serious, so it could wait for 2.0.0, too ;-)\n\n builtin-log.c |   39 ++++++++++++++++++++++++++++++++-------\n 1 files changed, 32 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex cc3cc90..c2ad863 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -244,7 +244,29 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)\n \treturn cmd_log_walk(&rev);\n }\n \n-static int show_object(const unsigned char *sha1, int suppress_header)\n+static void show_tagger(char *buf, int len, struct rev_info *rev)\n+{\n+\tchar *email_end, *p;\n+\tunsigned long date;\n+\tint tz;\n+\n+\temail_end = memchr(buf, '>', len);\n+\tif (!email_end)\n+\t\treturn;\n+\tp = ++email_end;\n+\twhile (isspace(*p))\n+\t\tp++;\n+\tdate = strtoul(p, &p, 10);\n+\twhile (isspace(*p))\n+\t\tp++;\n+\ttz = (int)strtol(p, NULL, 10);\n+\tprintf(\"Tagger: %.*s\\nDate:   %s\\n\",\n+\t\t\temail_end - buf, buf,\n+\t\t\tshow_date(date, tz, rev->date_mode));\n+}\n+\n+static int show_object(const unsigned char *sha1, int show_tag_object,\n+\tstruct rev_info *rev)\n {\n \tunsigned long size;\n \tenum object_type type;\n@@ -254,11 +276,14 @@ static int show_object(const unsigned char *sha1, int suppress_header)\n \tif (!buf)\n \t\treturn error(\"Could not read object %s\", sha1_to_hex(sha1));\n \n-\tif (suppress_header)\n-\t\twhile (offset < size && buf[offset++] != '\\n') {\n-\t\t\tint new_offset = offset;\n+\tif (show_tag_object)\n+\t\twhile (offset < size && buf[offset] != '\\n') {\n+\t\t\tint new_offset = offset + 1;\n \t\t\twhile (new_offset < size && buf[new_offset++] != '\\n')\n \t\t\t\t; /* do nothing */\n+\t\t\tif (!prefixcmp(buf + offset, \"tagger \"))\n+\t\t\t\tshow_tagger(buf + offset + 7,\n+\t\t\t\t\t    new_offset - offset - 7, rev);\n \t\t\toffset = new_offset;\n \t\t}\n \n@@ -299,16 +324,16 @@ int cmd_show(int argc, const char **argv, const char *prefix)\n \t\tconst char *name = objects[i].name;\n \t\tswitch (o->type) {\n \t\tcase OBJ_BLOB:\n-\t\t\tret = show_object(o->sha1, 0);\n+\t\t\tret = show_object(o->sha1, 0, NULL);\n \t\t\tbreak;\n \t\tcase OBJ_TAG: {\n \t\t\tstruct tag *t = (struct tag *)o;\n \n-\t\t\tprintf(\"%stag %s%s\\n\\n\",\n+\t\t\tprintf(\"%stag %s%s\\n\",\n \t\t\t\t\tdiff_get_color_opt(&rev.diffopt, DIFF_COMMIT),\n \t\t\t\t\tt->tag,\n \t\t\t\t\tdiff_get_color_opt(&rev.diffopt, DIFF_RESET));\n-\t\t\tret = show_object(o->sha1, 1);\n+\t\t\tret = show_object(o->sha1, 1, &rev);\n \t\t\tobjects[i].item = (struct object *)t->tagged;\n \t\t\ti--;\n \t\t\tbreak;\n-- \n1.5.4.rc0.70.g30f7\n"},{"id":"63661","messageId":"7vfxxzzrv8.fsf@gitster.siamese.dyndns.org","threadId":"11347","inReplyTo":"Pine.LNX.4.64.0712181800250.23902@racer.site","subject":"Re: [PATCH] git show <tag>: show the tagger","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-18T20:10:19Z","receivedAt":"2007-12-18T20:10:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> For commit objects, the Author is shown, so do the equivalent for\n> tag objects, too.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>\n> \tI know, it's feature freeze period.  But this is arguably a \n> \tusability bug.\n\nI'll wait for people to argue this fixes a usability bug, then.\n"},{"id":"63680","messageId":"m38x3rpu0t.fsf@roke.D-201","threadId":"11347","inReplyTo":"7vfxxzzrv8.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git show <tag>: show the tagger","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-12-18T21:33:59Z","receivedAt":"2007-12-18T21:33:59Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > For commit objects, the Author is shown, so do the equivalent for\n> > tag objects, too.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >\n> > \tI know, it's feature freeze period.  But this is arguably a \n> > \tusability bug.\n> \n> I'll wait for people to argue this fixes a usability bug, then.\n\nIMHO the fact that currently \"git show <tag>\" _doesn't_ show\nauthor and date of tag is a (usability) bug.\n\nFortunately \"git cat-file -p <tag>\" (or \"git cat <tag>\" with my\ncurrent alias) works, and dos show date in human-readable form.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"63729","messageId":"4768E034.1040903@op5.se","threadId":"11347","inReplyTo":"Pine.LNX.4.64.0712181800250.23902@racer.site","subject":"Re: [PATCH] git show <tag>: show the tagger","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-12-19T09:11:16Z","receivedAt":"2007-12-19T09:11:16Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> For commit objects, the Author is shown, so do the equivalent for\n> tag objects, too.\n> \n\nThat's funny. I tried to apply this onto my \"patches\" branch and got\nconflicts. I have a near-identical one there that I forgot about\n~6 months back, so\n\nAcked-by: Andreas Ericsson <ae@op5.se>\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}