{"thread":{"id":"15360","subject":"[PATCH 1/2] add '%d' pretty format specifier to show decoration","startedAt":"2008-09-03T18:40:08Z","lastAt":"2008-09-09T20:15:40Z","messageCount":23,"participants":["Michael Dressel","Jeff King","Junio C Hamano","René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"89666","messageId":"alpine.LNX.1.10.0809032036270.32295@pollux","threadId":"15360","inReplyTo":null,"subject":"[PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-09-03T18:40:08Z","receivedAt":"2008-09-03T18:40:08Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\nThis is a variation of the patch provided by  Jeff King <peff@peff.net>:\nallow '%d' pretty format specifier to show decoration\n\nPreviously, specifying\n\n   git log --pretty=format:'%H %s' --decorate\n\nwould calculate decorations, but not show them. You can now\ndo:\n\n   git log --pretty=format:'%H (%d) %s'\n\nto see them.\n\nThe difference is that you don't need --decorate when %d has been given\nbecause this would be \"doppeltgemoppelt\" (redundant).\n\nSigned-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>\n---\n  Documentation/pretty-formats.txt |    1 +\n  builtin-log.c                    |   24 +++++++++++++++++++++++-\n  pretty.c                         |   15 +++++++++++++++\n  3 files changed, 39 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nindex 388d492..2616d63 100644\n--- a/Documentation/pretty-formats.txt\n+++ b/Documentation/pretty-formats.txt\n@@ -116,6 +116,7 @@ The placeholders are:\n  - '%cr': committer date, relative\n  - '%ct': committer date, UNIX timestamp\n  - '%ci': committer date, ISO 8601 format\n+- '%d': decoration\n  - '%e': encoding\n  - '%s': subject\n  - '%b': body\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1d3c5cb..5424012 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -50,11 +50,29 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in\n  \treturn 0;\n  }\n\n+static int deco_in_format(int argc, const char **argv)\n+{\n+\tint i;\n+\tint deco=0;\n+\tfor (i=0;i<argc;i++)\n+\t{\n+\t\tif ((strstr(argv[i], \"pretty=format:\") ||\n+\t\t\t\t\tstrstr(argv[i], \"pretty=tformat:\")) &&\n+\t\t\t\tstrstr(argv[i], \"%d\"))\n+\t\t{\n+\t\t\tdeco=1;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t}\n+\treturn deco;\n+}\n+\n  static void cmd_log_init(int argc, const char **argv, const char *prefix,\n  \t\t      struct rev_info *rev)\n  {\n  \tint i;\n-\tint decorate = 0;\n+\tint decorate = deco_in_format(argc, argv);\n\n  \trev->abbrev = DEFAULT_ABBREV;\n  \trev->commit_format = CMIT_FMT_DEFAULT;\n@@ -77,6 +95,10 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n  \t\tif (rev->diffopt.nr_paths != 1)\n  \t\t\tusage(\"git logs can only follow renames on one pathname at a time\");\n  \t}\n+\tif (decorate)\n+\t{\n+\t\tfor_each_ref(add_ref_decoration, NULL);\n+\t}\n  \tfor (i = 1; i < argc; i++) {\n  \t\tconst char *arg = argv[i];\n  \t\tif (!strcmp(arg, \"--decorate\")) {\ndiff --git a/pretty.c b/pretty.c\nindex a29c290..3430e4d 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -520,8 +520,23 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,\n  \t\t\treturn 3;\n  \t\t} else\n  \t\t\treturn 0;\n+\tcase 'd':\n+\t\t{\n+\t\t\tstruct name_decoration *d;\n+\t\t\tconst char *prefix = \"\";\n+\t\t\td = lookup_decoration(&name_decoration,\n+\t\t\t\t\t&commit->object);\n+\t\t\twhile (d) {\n+\t\t\t\tstrbuf_addstr(sb, prefix);\n+\t\t\t\tprefix = \", \";\n+\t\t\t\tstrbuf_addstr(sb, d->name);\n+\t\t\t\td = d->next;\n+\t\t\t}\n+\t\t}\n+\t\treturn 1;\n  \t}\n\n+\n  \t/* these depend on the commit */\n  \tif (!commit->object.parsed)\n  \t\tparse_object(commit->object.sha1);\n-- \n1.6.0.1\n"},{"id":"89670","messageId":"20080903191217.GA31195@coredump.intra.peff.net","threadId":"15360","inReplyTo":"alpine.LNX.1.10.0809032036270.32295@pollux","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-03T19:12:17Z","receivedAt":"2008-09-03T19:12:17Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 03, 2008 at 08:40:08PM +0200, Michael Dressel wrote:\n\n> This is a variation of the patch provided by  Jeff King <peff@peff.net>:\n> allow '%d' pretty format specifier to show decoration\n\nThank you for picking this up. I had been meaning to look at it further\nbut hadn't gotten around to it yet.\n\n> would calculate decorations, but not show them. You can now\n> do:\n>\n>   git log --pretty=format:'%H (%d) %s'\n\nI think Junio requested the enclosing parentheses be included. I am not\nsure I agree, but we are already mandating the comma separator.\nPersonally, I think the right solution is more like\n\n  %(decorate:delim=, )\n\nbut that is a much bigger change (and part of what was holding me up on\njust improving this patch). I think adding %d in the meantime (with or\nwithout the surrounding parentheses) is reasonable.\n\n> The difference is that you don't need --decorate when %d has been given\n> because this would be \"doppeltgemoppelt\" (redundant).\n\nThis is good, but I don't like the implementation:\n\n> +static int deco_in_format(int argc, const char **argv)\n> +{\n> +\tint i;\n> +\tint deco=0;\n> +\tfor (i=0;i<argc;i++)\n> +\t{\n> +\t\tif ((strstr(argv[i], \"pretty=format:\") ||\n> +\t\t\t\t\tstrstr(argv[i], \"pretty=tformat:\")) &&\n> +\t\t\t\tstrstr(argv[i], \"%d\"))\n> +\t\t{\n> +\t\t\tdeco=1;\n> +\t\t\tbreak;\n> +\t\t}\n> +\n> +\t}\n> +\treturn deco;\n> +}\n\nThere are two bad things about this:\n\n  1. It looks through argv. Partly this is a bit ugly, and we should\n     just hook into the part where we have already parsed --pretty=.\n     Which in this case really means looking at user_format after\n     calling setup_revisions (which is sadly a static global; it really\n     should be cleaned up as a member of struct rev_list). But worse\n     here is that you don't even look through argv correctly. You really\n     want prefixcmp(argv[i], \"--pretty=format:\"), since otherwise this\n     would trigger on something like:\n\n         git log ':/implement %d in pretty:format'\n\n     which is unlikely, perhaps, but I don't think it's that hard to do\n     it right in this case.\n\n  2. It just looks for '%d' rather than using the same parser as the\n     rest of the code. I _think_ this is actually correct now, because\n     we don't even allow simple quoting like '%%d'. But it would be much\n     cleaner, I think, to have a library call next to\n     format_commit_message() that fills in a struct of \"used\" items.\n\nSo something like:\n\n  static void cmd_log_init(...)\n  {\n          struct user_format_need ufneed;\n  ...\n          for (i = 1; i < argc; i++) {\n            ...\n                  if (!stcmp(arg, \"--decorate\"))\n                          decorate = 1;\n            ...\n          }\n\n          user_format_needs(&ufneed);\n          if (decorate || ufneed.decorate)\n            for_each_ref(add_ref_decoration, NULL);\n\n  }\n\nMake sense?\n\n-Peff\n"},{"id":"89672","messageId":"20080903191732.GC31195@coredump.intra.peff.net","threadId":"15360","inReplyTo":"alpine.LNX.1.10.0809032036270.32295@pollux","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-03T19:17:32Z","receivedAt":"2008-09-03T19:17:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 03, 2008 at 08:40:08PM +0200, Michael Dressel wrote:\n\n> Signed-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>\n\nAlso, I don't recall whether it was in the original message, but feel\nfree to add my\n\n  Signed-off-by: Jeff King <peff@peff.net>\n\nfor my portions.\n\n-Peff\n"},{"id":"89679","messageId":"alpine.LNX.1.10.0809032200490.32548@pollux","threadId":"15360","inReplyTo":"20080903191732.GC31195@coredump.intra.peff.net","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-09-03T20:06:45Z","receivedAt":"2008-09-03T20:06:45Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\n\nOn Wed, 3 Sep 2008, Jeff King wrote:\n\n> On Wed, Sep 03, 2008 at 08:40:08PM +0200, Michael Dressel wrote:\n>\n>> Signed-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>\n>\n> Also, I don't recall whether it was in the original message, but feel\n> free to add my\n>\n>  Signed-off-by: Jeff King <peff@peff.net>\n>\n> for my portions.\n>\nI'm sorry for not properly citing you. I did mention you in the commit\nmessage which is wrong. So what would be the right way? Just adding a\nline \nSigned-off-by: Jeff King <peff@peff.net>\nbefore the ---?\nOr resending your original patch and than my patch on top of yours?\n\nCheers,\nMichael\n"},{"id":"89680","messageId":"7v4p4xat3v.fsf@gitster.siamese.dyndns.org","threadId":"15360","inReplyTo":"20080903191217.GA31195@coredump.intra.peff.net","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-03T20:10:12Z","receivedAt":"2008-09-03T20:10:12Z","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>>   git log --pretty=format:'%H (%d) %s'\n>\n> I think Junio requested the enclosing parentheses be included. I am not\n> sure I agree, but we are already mandating the comma separator.\n> Personally, I think the right solution is more like\n>\n>   %(decorate:delim=, )\n>\n> but that is a much bigger change (and part of what was holding me up on\n> just improving this patch). I think adding %d in the meantime (with or\n> without the surrounding parentheses) is reasonable.\n\nI agree with the above reasoning.  If we go with surrounding parentheses,\nit might even make sense to include a SP _before_ the opening parenthesis,\nso that \"%h %s%d\" expands to either of these:\n\n   $ git show -s --pretty=format:'%h %s%d' v1.6.0^0 v1.6.0^1\n   ea02eef GIT 1.6.0 (refs/tags/v1.6.0)\n   373a273 Merge git-gui 0.11.0\n\nAlso I did not like the bug to misidentify \"git log --grep=pretty=format:\"\nyou pointed out in your message.\n"},{"id":"89681","messageId":"20080903203324.GA32223@coredump.intra.peff.net","threadId":"15360","inReplyTo":"alpine.LNX.1.10.0809032200490.32548@pollux","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-03T20:33:24Z","receivedAt":"2008-09-03T20:33:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 03, 2008 at 10:06:45PM +0200, Michael Dressel wrote:\n\n> I'm sorry for not properly citing you. I did mention you in the commit\n> message which is wrong. So what would be the right way? Just adding a\n> line Signed-off-by: Jeff King <peff@peff.net>\n> before the ---?\n> Or resending your original patch and than my patch on top of yours?\n\nOh, you cited me just fine. The Signed-off-by line isn't for credit; it\nindicates that you agree to the Developer's Certificate of Origin. IOW,\nit says \"I wrote this (or I know who did) and I know it can be licensed\nfor the project\". So what I was saying was not \"oh, you didn't credit me\nproperly\" but rather \"you may also add to the official record that the\nparts I wrote are fine to be GPL'd for the project.\"\n\nSo in this case, I would simply add my Signed-off-by to the commit\nmessage when you resend the patch.\n\n-Peff\n"},{"id":"89682","messageId":"20080903203616.GB32223@coredump.intra.peff.net","threadId":"15360","inReplyTo":"7v4p4xat3v.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-03T20:36:16Z","receivedAt":"2008-09-03T20:36:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 03, 2008 at 01:10:12PM -0700, Junio C Hamano wrote:\n\n> I agree with the above reasoning.  If we go with surrounding parentheses,\n> it might even make sense to include a SP _before_ the opening parenthesis,\n> so that \"%h %s%d\" expands to either of these:\n> \n>    $ git show -s --pretty=format:'%h %s%d' v1.6.0^0 v1.6.0^1\n>    ea02eef GIT 1.6.0 (refs/tags/v1.6.0)\n>    373a273 Merge git-gui 0.11.0\n\nIsn't that what you argued against in Dscho's version of the patch?\n\n    http://mid.gmane.org/7v1w5exfwb.fsf@gitster.siamese.dyndns.org\n\n-Peff\n"},{"id":"89684","messageId":"7vsksh9c9m.fsf@gitster.siamese.dyndns.org","threadId":"15360","inReplyTo":"20080903203616.GB32223@coredump.intra.peff.net","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-03T20:59:17Z","receivedAt":"2008-09-03T20:59:17Z","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> On Wed, Sep 03, 2008 at 01:10:12PM -0700, Junio C Hamano wrote:\n>\n>> I agree with the above reasoning.  If we go with surrounding parentheses,\n>> it might even make sense to include a SP _before_ the opening parenthesis,\n>> so that \"%h %s%d\" expands to either of these:\n>> \n>>    $ git show -s --pretty=format:'%h %s%d' v1.6.0^0 v1.6.0^1\n>>    ea02eef GIT 1.6.0 (refs/tags/v1.6.0)\n>>    373a273 Merge git-gui 0.11.0\n>\n> Isn't that what you argued against in Dscho's version of the patch?\n>\n>     http://mid.gmane.org/7v1w5exfwb.fsf@gitster.siamese.dyndns.org\n\nYeah, but unlike Linus, I am not infallible.  Also, I can change my mind.\n\nIf the concensus is that we do the simpler variant _now_ and leave\nextending it for later, I think it is Ok to pick any one reasonable\ndefault/simple format, and including the parentheses (with leading SP)\nwould be one reasonable default, certainly more reasonable than not\nincluding the parentheses at all.\n\nThe background is somewhat different, too.\n\nBack then I didn't think anybody but Dscho was interested in including\ndecorate in --pretty=format in half-baked form.  René is comment was to do\nmore flexible but complex variant.  I didn't see many people wanted to\nhave it in \"limited but usable for simpler needs\" form.\n\nIt wasn't that urgent, as opposed to this round more people seem to be\ninterested in having it even in a limited form.  And I knew Dscho was very\nmuch capable of doing the \"going whole nine yards\" version, instead of a\nsimple-limited one.  \"If we can afford to spend time to get it right in\nthe first round why not?\" was part of the reasons behind my objection.\n"},{"id":"89686","messageId":"20080903210418.GB32413@coredump.intra.peff.net","threadId":"15360","inReplyTo":"7vsksh9c9m.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-03T21:04:18Z","receivedAt":"2008-09-03T21:04:18Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 03, 2008 at 01:59:17PM -0700, Junio C Hamano wrote:\n\n> > Isn't that what you argued against in Dscho's version of the patch?\n> >\n> >     http://mid.gmane.org/7v1w5exfwb.fsf@gitster.siamese.dyndns.org\n> \n> Yeah, but unlike Linus, I am not infallible.  Also, I can change my mind.\n\nHeh. OK, I am not against you changing your mind, but I like to at least\nsee \"...and here is what is different.\" So thank you.\n\nI think adding the space to the parentheses makes the most sense.\nWithout more advanced syntax, we have to make a choice between doing too\nmuch (e.g., adding parentheses when the user doesn't want it) and too\nlittle (the user has to put in parentheses manually, which means they\nare there whether there is decoration or not). Doing parentheses\n_without_ the space means we fail at both. So let us at least get it\nhalf right. ;)\n\n-Peff\n"},{"id":"89695","messageId":"48BF0A5A.2040502@lsrfire.ath.cx","threadId":"15360","inReplyTo":"7vsksh9c9m.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-03T22:06:18Z","receivedAt":"2008-09-03T22:06:18Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Junio C Hamano schrieb:\n> If the concensus is that we do the simpler variant _now_ and leave\n> extending it for later, I think it is Ok to pick any one reasonable\n> default/simple format, and including the parentheses (with leading SP)\n> would be one reasonable default, certainly more reasonable than not\n> including the parentheses at all.\n\nYes, but can we please use the existing parser and not add another one\njust to find out if some initialization is needed?  Also,\nformat_commit_message() is called from git archive.  In order to keep\nall the placeholders working on each call site, it's better to control\neverything from there.\n\nThe patch below does that by using a static variable to remember if the\ndecorations have already been loaded.  That's not too unreasonable, I\nthink, because we currently have no way of unloading them.\n\nThe patch should be split up and contains no documentation updates.  It\n\n  - moves add_name_decoration() and add_ref_decoration() to log-tree.c,\n    next to the variable name_decoration they are working with,\n\n  - exports add_ref_decoration(),\n\n  - adds load_ref_decorations(), which loads all refs as decorations,\n    unless they have already been loaded,\n\n  - adds the placeholder %d, with parentheses and leading space (or\n    empty if no decoration is present).\n\nThanks,\nRené\n\n\n builtin-log.c |   25 -------------------------\n log-tree.c    |   36 ++++++++++++++++++++++++++++++++++++\n log-tree.h    |    3 +++\n pretty.c      |   25 +++++++++++++++++++++++++\n 4 files changed, 64 insertions(+), 25 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1d3c5cb..ba1ef8d 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -25,31 +25,6 @@ static int default_show_root = 1;\n static const char *fmt_patch_subject_prefix = \"PATCH\";\n static const char *fmt_pretty;\n \n-static void add_name_decoration(const char *prefix, const char *name, struct object *obj)\n-{\n-\tint plen = strlen(prefix);\n-\tint nlen = strlen(name);\n-\tstruct name_decoration *res = xmalloc(sizeof(struct name_decoration) + plen + nlen);\n-\tmemcpy(res->name, prefix, plen);\n-\tmemcpy(res->name + plen, name, nlen + 1);\n-\tres->next = add_decoration(&name_decoration, obj, res);\n-}\n-\n-static int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)\n-{\n-\tstruct object *obj = parse_object(sha1);\n-\tif (!obj)\n-\t\treturn 0;\n-\tadd_name_decoration(\"\", refname, obj);\n-\twhile (obj->type == OBJ_TAG) {\n-\t\tobj = ((struct tag *)obj)->tagged;\n-\t\tif (!obj)\n-\t\t\tbreak;\n-\t\tadd_name_decoration(\"tag: \", refname, obj);\n-\t}\n-\treturn 0;\n-}\n-\n static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t      struct rev_info *rev)\n {\ndiff --git a/log-tree.c b/log-tree.c\nindex 30cd5bb..083d08a 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -1,12 +1,48 @@\n #include \"cache.h\"\n #include \"diff.h\"\n #include \"commit.h\"\n+#include \"tag.h\"\n #include \"graph.h\"\n #include \"log-tree.h\"\n #include \"reflog-walk.h\"\n+#include \"refs.h\"\n \n struct decoration name_decoration = { \"object names\" };\n \n+static void add_name_decoration(const char *prefix, const char *name, struct object *obj)\n+{\n+\tint plen = strlen(prefix);\n+\tint nlen = strlen(name);\n+\tstruct name_decoration *res = xmalloc(sizeof(struct name_decoration) + plen + nlen);\n+\tmemcpy(res->name, prefix, plen);\n+\tmemcpy(res->name + plen, name, nlen + 1);\n+\tres->next = add_decoration(&name_decoration, obj, res);\n+}\n+\n+int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)\n+{\n+\tstruct object *obj = parse_object(sha1);\n+\tif (!obj)\n+\t\treturn 0;\n+\tadd_name_decoration(\"\", refname, obj);\n+\twhile (obj->type == OBJ_TAG) {\n+\t\tobj = ((struct tag *)obj)->tagged;\n+\t\tif (!obj)\n+\t\t\tbreak;\n+\t\tadd_name_decoration(\"tag: \", refname, obj);\n+\t}\n+\treturn 0;\n+}\n+\n+void load_ref_decorations(void)\n+{\n+\tstatic int loaded;\n+\tif (!loaded) {\n+\t\tloaded = 1;\n+\t\tfor_each_ref(add_ref_decoration, NULL);\n+\t}\n+}\n+\n static void show_parents(struct commit *commit, int abbrev)\n {\n \tstruct commit_list *p;\ndiff --git a/log-tree.h b/log-tree.h\nindex 59ba4c4..beeb86e 100644\n--- a/log-tree.h\n+++ b/log-tree.h\n@@ -18,4 +18,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name,\n \t\t\t     const char **extra_headers_p,\n \t\t\t     int *need_8bit_cte_p);\n \n+int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data);\n+void load_ref_decorations(void);\n+\n #endif\ndiff --git a/pretty.c b/pretty.c\nindex a29c290..4a31e31 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -5,6 +5,7 @@\n #include \"revision.h\"\n #include \"string-list.h\"\n #include \"mailmap.h\"\n+#include \"log-tree.h\"\n \n static char *user_format;\n \n@@ -423,6 +424,7 @@ struct format_commit_context {\n \tstruct chunk abbrev_commit_hash;\n \tstruct chunk abbrev_tree_hash;\n \tstruct chunk abbrev_parent_hashes;\n+\tstruct chunk decoration;\n };\n \n static int add_again(struct strbuf *sb, struct chunk *chunk)\n@@ -481,6 +483,23 @@ static void parse_commit_header(struct format_commit_context *context)\n \tcontext->commit_header_parsed = 1;\n }\n \n+static void format_decoration(struct strbuf *sb, const struct commit *commit)\n+{\n+\tstruct name_decoration *d;\n+\tconst char *prefix = \" (\";\n+\n+\tload_ref_decorations();\n+\td = lookup_decoration(&name_decoration, &commit->object);\n+\twhile (d) {\n+\t\tstrbuf_addstr(sb, prefix);\n+\t\tprefix = \", \";\n+\t\tstrbuf_addstr(sb, d->name);\n+\t\td = d->next;\n+\t}\n+\tif (prefix[0] == ',')\n+\t\tstrbuf_addch(sb, ')');\n+}\n+\n static size_t format_commit_item(struct strbuf *sb, const char *placeholder,\n                                void *context)\n {\n@@ -520,6 +539,12 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,\n \t\t\treturn 3;\n \t\t} else\n \t\t\treturn 0;\n+\tcase 'd':\n+\t\tif (add_again(sb, &c->decoration))\n+\t\t\treturn 1;\n+\t\tformat_decoration(sb, commit);\n+\t\tc->decoration.len = sb->len - c->decoration.off;\n+\t\treturn 1;\n \t}\n \n \t/* these depend on the commit */\n"},{"id":"89718","messageId":"20080904035139.GA28123@sigill.intra.peff.net","threadId":"15360","inReplyTo":"48BF0A5A.2040502@lsrfire.ath.cx","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-04T03:51:40Z","receivedAt":"2008-09-04T03:51:40Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 04, 2008 at 12:06:18AM +0200, René Scharfe wrote:\n\n> The patch below does that by using a static variable to remember if the\n> decorations have already been loaded.  That's not too unreasonable, I\n> think, because we currently have no way of unloading them.\n\nYes, I think lazy loading is a good solution here, since there is no\nextra context that needs to be known to load the decorations.\n\n> +\tcase 'd':\n> +\t\tif (add_again(sb, &c->decoration))\n> +\t\t\treturn 1;\n> +\t\tformat_decoration(sb, commit);\n> +\t\tc->decoration.len = sb->len - c->decoration.off;\n> +\t\treturn 1;\n\nThe add_again chunk code is for things that take a long time (like\nfinding the shortest abbreviation for some hashes). I'm not sure this\ncounts as \"long\", as it is just doing a hash lookup on the decoration.\nOn the other hand, I doubt the extra couple of bytes used hurts much.\n\n-Peff\n"},{"id":"89771","messageId":"48C002FB.9010401@lsrfire.ath.cx","threadId":"15360","inReplyTo":"20080904035139.GA28123@sigill.intra.peff.net","subject":"Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-04T15:47:07Z","receivedAt":"2008-09-04T15:47:07Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Jeff King schrieb:\n> On Thu, Sep 04, 2008 at 12:06:18AM +0200, René Scharfe wrote:\n>> +\tcase 'd':\n>> +\t\tif (add_again(sb, &c->decoration))\n>> +\t\t\treturn 1;\n>> +\t\tformat_decoration(sb, commit);\n>> +\t\tc->decoration.len = sb->len - c->decoration.off;\n>> +\t\treturn 1;\n> \n> The add_again chunk code is for things that take a long time (like\n> finding the shortest abbreviation for some hashes). I'm not sure this\n> counts as \"long\", as it is just doing a hash lookup on the decoration.\n> On the other hand, I doubt the extra couple of bytes used hurts much.\n\nYes, you're right -- let's do without caching at first.  If it turns out\nthat we're too slow we can easily add it later.\n\nThanks,\nRené\n"},{"id":"89792","messageId":"48C05540.5070204@lsrfire.ath.cx","threadId":"15360","inReplyTo":"48C002FB.9010401@lsrfire.ath.cx","subject":"[PATCH 1/3] log: add load_ref_decorations()","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-04T21:38:08Z","receivedAt":"2008-09-04T21:38:08Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Move the loading of all ref names for decoration into its own function.\nA static variable prevents loading twice, because it's quite expensive.\nWe can do it this way because we currently never unload decorations.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n builtin-log.c |   12 ++++++++++--\n 1 files changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1d3c5cb..0f16462 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -50,6 +50,15 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in\n \treturn 0;\n }\n \n+void load_ref_decorations(void)\n+{\n+\tstatic int loaded;\n+\tif (!loaded) {\n+\t\tloaded = 1;\n+\t\tfor_each_ref(add_ref_decoration, NULL);\n+\t}\n+}\n+\n static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t      struct rev_info *rev)\n {\n@@ -80,8 +89,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \tfor (i = 1; i < argc; i++) {\n \t\tconst char *arg = argv[i];\n \t\tif (!strcmp(arg, \"--decorate\")) {\n-\t\t\tif (!decorate)\n-\t\t\t\tfor_each_ref(add_ref_decoration, NULL);\n+\t\t\tload_ref_decorations();\n \t\t\tdecorate = 1;\n \t\t} else\n \t\t\tdie(\"unrecognized argument: %s\", arg);\n-- \n1.6.0.1.161.g7f314\n"},{"id":"89793","messageId":"48C05589.5050805@lsrfire.ath.cx","threadId":"15360","inReplyTo":"48C002FB.9010401@lsrfire.ath.cx","subject":"[PATCH 2/3] move load_ref_decorations() to log-tree.c and export it","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-04T21:39:21Z","receivedAt":"2008-09-04T21:39:21Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"log-tree.c is the ideal place for load_ref_decorations() and its\nhelper functions to live in, because the variable name_decoration\nthey're operating on is already located there, so move them thither.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n builtin-log.c |   35 -----------------------------------\n log-tree.c    |   36 ++++++++++++++++++++++++++++++++++++\n log-tree.h    |    1 +\n 3 files changed, 37 insertions(+), 35 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 0f16462..081e660 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -14,7 +14,6 @@\n #include \"tag.h\"\n #include \"reflog-walk.h\"\n #include \"patch-ids.h\"\n-#include \"refs.h\"\n #include \"run-command.h\"\n #include \"shortlog.h\"\n \n@@ -25,40 +24,6 @@ static int default_show_root = 1;\n static const char *fmt_patch_subject_prefix = \"PATCH\";\n static const char *fmt_pretty;\n \n-static void add_name_decoration(const char *prefix, const char *name, struct object *obj)\n-{\n-\tint plen = strlen(prefix);\n-\tint nlen = strlen(name);\n-\tstruct name_decoration *res = xmalloc(sizeof(struct name_decoration) + plen + nlen);\n-\tmemcpy(res->name, prefix, plen);\n-\tmemcpy(res->name + plen, name, nlen + 1);\n-\tres->next = add_decoration(&name_decoration, obj, res);\n-}\n-\n-static int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)\n-{\n-\tstruct object *obj = parse_object(sha1);\n-\tif (!obj)\n-\t\treturn 0;\n-\tadd_name_decoration(\"\", refname, obj);\n-\twhile (obj->type == OBJ_TAG) {\n-\t\tobj = ((struct tag *)obj)->tagged;\n-\t\tif (!obj)\n-\t\t\tbreak;\n-\t\tadd_name_decoration(\"tag: \", refname, obj);\n-\t}\n-\treturn 0;\n-}\n-\n-void load_ref_decorations(void)\n-{\n-\tstatic int loaded;\n-\tif (!loaded) {\n-\t\tloaded = 1;\n-\t\tfor_each_ref(add_ref_decoration, NULL);\n-\t}\n-}\n-\n static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t      struct rev_info *rev)\n {\ndiff --git a/log-tree.c b/log-tree.c\nindex 30cd5bb..2c1f3e6 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -1,12 +1,48 @@\n #include \"cache.h\"\n #include \"diff.h\"\n #include \"commit.h\"\n+#include \"tag.h\"\n #include \"graph.h\"\n #include \"log-tree.h\"\n #include \"reflog-walk.h\"\n+#include \"refs.h\"\n \n struct decoration name_decoration = { \"object names\" };\n \n+static void add_name_decoration(const char *prefix, const char *name, struct object *obj)\n+{\n+\tint plen = strlen(prefix);\n+\tint nlen = strlen(name);\n+\tstruct name_decoration *res = xmalloc(sizeof(struct name_decoration) + plen + nlen);\n+\tmemcpy(res->name, prefix, plen);\n+\tmemcpy(res->name + plen, name, nlen + 1);\n+\tres->next = add_decoration(&name_decoration, obj, res);\n+}\n+\n+static int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)\n+{\n+\tstruct object *obj = parse_object(sha1);\n+\tif (!obj)\n+\t\treturn 0;\n+\tadd_name_decoration(\"\", refname, obj);\n+\twhile (obj->type == OBJ_TAG) {\n+\t\tobj = ((struct tag *)obj)->tagged;\n+\t\tif (!obj)\n+\t\t\tbreak;\n+\t\tadd_name_decoration(\"tag: \", refname, obj);\n+\t}\n+\treturn 0;\n+}\n+\n+void load_ref_decorations(void)\n+{\n+\tstatic int loaded;\n+\tif (!loaded) {\n+\t\tloaded = 1;\n+\t\tfor_each_ref(add_ref_decoration, NULL);\n+\t}\n+}\n+\n static void show_parents(struct commit *commit, int abbrev)\n {\n \tstruct commit_list *p;\ndiff --git a/log-tree.h b/log-tree.h\nindex 59ba4c4..3c8127b 100644\n--- a/log-tree.h\n+++ b/log-tree.h\n@@ -17,5 +17,6 @@ void log_write_email_headers(struct rev_info *opt, const char *name,\n \t\t\t     const char **subject_p,\n \t\t\t     const char **extra_headers_p,\n \t\t\t     int *need_8bit_cte_p);\n+void load_ref_decorations(void);\n \n #endif\n-- \n1.6.0.1.161.g7f314\n"},{"id":"89794","messageId":"48C055B3.3030204@lsrfire.ath.cx","threadId":"15360","inReplyTo":"48C002FB.9010401@lsrfire.ath.cx","subject":"[PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-04T21:40:03Z","receivedAt":"2008-09-04T21:40:03Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Add a new format placeholder, %d, which expands to a ref name decoration\n(think git log --decorate).  It expands to an empty string if the commit\nhas no decoration, or otherwise to a comma (and space) separated list of\ndecorations, surrounded by parentheses and a leading space.\n\nMichael Dressel implemented an initial version and chose the letter d,\nJunio suggested to add a leading space and parentheses.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/pretty-formats.txt |    1 +\n pretty.c                         |   21 +++++++++++++++++++++\n 2 files changed, 22 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nindex 388d492..f18d33e 100644\n--- a/Documentation/pretty-formats.txt\n+++ b/Documentation/pretty-formats.txt\n@@ -116,6 +116,7 @@ The placeholders are:\n - '%cr': committer date, relative\n - '%ct': committer date, UNIX timestamp\n - '%ci': committer date, ISO 8601 format\n+- '%d': ref names, like the --decorate option of linkgit:git-log[1]\n - '%e': encoding\n - '%s': subject\n - '%b': body\ndiff --git a/pretty.c b/pretty.c\nindex a29c290..8beafa0 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -5,6 +5,7 @@\n #include \"revision.h\"\n #include \"string-list.h\"\n #include \"mailmap.h\"\n+#include \"log-tree.h\"\n \n static char *user_format;\n \n@@ -481,6 +482,23 @@ static void parse_commit_header(struct format_commit_context *context)\n \tcontext->commit_header_parsed = 1;\n }\n \n+static void format_decoration(struct strbuf *sb, const struct commit *commit)\n+{\n+\tstruct name_decoration *d;\n+\tconst char *prefix = \" (\";\n+\n+\tload_ref_decorations();\n+\td = lookup_decoration(&name_decoration, &commit->object);\n+\twhile (d) {\n+\t\tstrbuf_addstr(sb, prefix);\n+\t\tprefix = \", \";\n+\t\tstrbuf_addstr(sb, d->name);\n+\t\td = d->next;\n+\t}\n+\tif (prefix[0] == ',')\n+\t\tstrbuf_addch(sb, ')');\n+}\n+\n static size_t format_commit_item(struct strbuf *sb, const char *placeholder,\n                                void *context)\n {\n@@ -573,6 +591,9 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,\n \t\t                 ? '<'\n \t\t                 : '>');\n \t\treturn 1;\n+\tcase 'd':\n+\t\tformat_decoration(sb, commit);\n+\t\treturn 1;\n \t}\n \n \t/* For the rest we have to parse the commit header. */\n-- \n1.6.0.1.161.g7f314\n"},{"id":"89813","messageId":"20080905001133.GA17463@coredump.intra.peff.net","threadId":"15360","inReplyTo":"48C055B3.3030204@lsrfire.ath.cx","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-05T00:11:34Z","receivedAt":"2008-09-05T00:11:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n\n> Michael Dressel implemented an initial version and chose the letter d,\n> Junio suggested to add a leading space and parentheses.\n\nThe whole series looks good to me, and I am happy if it is applied\nas-is. The only question I might raise is whether we want to use \"%d\"\nfor this, or use something longer to anticipate a collision with other\n\"d\" words (I think you mentioned \"describe\" at one point).\n\n-Peff\n"},{"id":"89814","messageId":"7v7i9r1lnm.fsf@gitster.siamese.dyndns.org","threadId":"15360","inReplyTo":"20080905001133.GA17463@coredump.intra.peff.net","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-05T00:28:13Z","receivedAt":"2008-09-05T00:28:13Z","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> On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n>\n>> Michael Dressel implemented an initial version and chose the letter d,\n>> Junio suggested to add a leading space and parentheses.\n>\n> The whole series looks good to me, and I am happy if it is applied\n> as-is. The only question I might raise is whether we want to use \"%d\"\n> for this, or use something longer to anticipate a collision with other\n> \"d\" words (I think you mentioned \"describe\" at one point).\n\nHow about using \"%d()\" for this one, so that later enhancements can\nspecify their features inside parentheses?\n"},{"id":"89815","messageId":"20080905003710.GA17731@coredump.intra.peff.net","threadId":"15360","inReplyTo":"7v7i9r1lnm.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-05T00:37:10Z","receivedAt":"2008-09-05T00:37:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 04, 2008 at 05:28:13PM -0700, Junio C Hamano wrote:\n\n> > The whole series looks good to me, and I am happy if it is applied\n> > as-is. The only question I might raise is whether we want to use \"%d\"\n> > for this, or use something longer to anticipate a collision with other\n> > \"d\" words (I think you mentioned \"describe\" at one point).\n> \n> How about using \"%d()\" for this one, so that later enhancements can\n> specify their features inside parentheses?\n\nI am slightly opposed to that, just because it then is very inconsistent\nwith the other formatting specifiers. I think it is worth introducing a\nnew, consistent syntax, providing that syntax for all specifiers (e.g.,\n%(body), %(decorate)), and then saying \"the existing %b, %d, et al are\nstill available and will be available forever. BUT they will never grow\nthe more interesting features like %(body:wrap=80) or\n%(decorate:delim=, ).\n\n-Peff\n"},{"id":"89816","messageId":"7v3akf1l1v.fsf@gitster.siamese.dyndns.org","threadId":"15360","inReplyTo":"20080905003710.GA17731@coredump.intra.peff.net","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-09-05T00:41:16Z","receivedAt":"2008-09-05T00:41:16Z","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> On Thu, Sep 04, 2008 at 05:28:13PM -0700, Junio C Hamano wrote:\n>\n>> > The whole series looks good to me, and I am happy if it is applied\n>> > as-is. The only question I might raise is whether we want to use \"%d\"\n>> > for this, or use something longer to anticipate a collision with other\n>> > \"d\" words (I think you mentioned \"describe\" at one point).\n>> \n>> How about using \"%d()\" for this one, so that later enhancements can\n>> specify their features inside parentheses?\n>\n> I am slightly opposed to that, just because it then is very inconsistent\n> with the other formatting specifiers. I think it is worth introducing a\n> new, consistent syntax, providing that syntax for all specifiers (e.g.,\n> %(body), %(decorate)), and then saying \"the existing %b, %d, et al are\n> still available and will be available forever. BUT they will never grow\n> the more interesting features like %(body:wrap=80) or\n> %(decorate:delim=, ).\n\nOk, fair enough.  Then it will be between \"%d\" vs \"%(decorate)\" for\ntoday's three patches.  If we do the former, then we will have one more in\nthe \"existing %b %d et al\" set when we do start working on extended\nformats; if we do the latter, \"existing\" will have one less format, but we\nhave many \"existing\" ones already, and one more will not hurt that much in\nthe long run.\n\nSo let's take these patches as-is, unless somebody else have better ideas?\n"},{"id":"89852","messageId":"48C15AFF.3070806@lsrfire.ath.cx","threadId":"15360","inReplyTo":"20080905001133.GA17463@coredump.intra.peff.net","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-05T16:14:55Z","receivedAt":"2008-09-05T16:14:55Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Jeff King schrieb:\n> On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n> \n>> Michael Dressel implemented an initial version and chose the letter d,\n>> Junio suggested to add a leading space and parentheses.\n> \n> The whole series looks good to me, and I am happy if it is applied\n> as-is. The only question I might raise is whether we want to use \"%d\"\n> for this, or use something longer to anticipate a collision with other\n> \"d\" words (I think you mentioned \"describe\" at one point).\n\n%d for decorations is OK, I think -- we still can use %D for describe.\nWhen someone implements it eventually. *cough* ;-)\n\nThanks,\nRené\n"},{"id":"89860","messageId":"alpine.LNX.1.10.0809052035280.3868@pollux","threadId":"15360","inReplyTo":"7v7i9r1lnm.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-09-05T18:38:03Z","receivedAt":"2008-09-05T18:38:03Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\n\nOn Thu, 4 Sep 2008, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n>\n>> On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n>>\n>>> Michael Dressel implemented an initial version and chose the letter d,\n>>> Junio suggested to add a leading space and parentheses.\n>>\n\nVery nice.\nOnly that I did not do the very first implementation it was Jeff King.\n\nCheers,\nMichael"},{"id":"90239","messageId":"alpine.LNX.2.00.0809091932080.3862@pollux","threadId":"15360","inReplyTo":"alpine.LNX.1.10.0809052035280.3868@pollux","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2008-09-09T17:33:33Z","receivedAt":"2008-09-09T17:33:33Z","isPatch":true,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"On Fri, 5 Sep 2008, Michael Dressel wrote:\n\n>\n>\n> On Thu, 4 Sep 2008, Junio C Hamano wrote:\n>\n>>  Jeff King <peff@peff.net> writes:\n>> \n>> >  On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n>> > \n>> > >  Michael Dressel implemented an initial version and chose the letter d,\n>> > >  Junio suggested to add a leading space and parentheses.\n>> > \n>\n> Very nice.\n> Only that I did not do the very first implementation it was Jeff King.\n\nI made a mistake. My last comment is wrong, There is an even  earlier \npatch from Johannes Schindelin. Second there is no contribution  left from \nme. I'm merely a happy user of the new feature.\n\nCheers,\nMichael\n\n"},{"id":"90252","messageId":"48C6D96C.3020207@lsrfire.ath.cx","threadId":"15360","inReplyTo":"alpine.LNX.2.00.0809091932080.3862@pollux","subject":"Re: [PATCH 3/3] add '%d' pretty format specifier to show decoration","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2008-09-09T20:15:40Z","receivedAt":"2008-09-09T20:15:40Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Michael Dressel schrieb:\n> On Fri, 5 Sep 2008, Michael Dressel wrote:\n>> On Thu, 4 Sep 2008, Junio C Hamano wrote:\n>>> Jeff King <peff@peff.net> writes:\n>>>> On Thu, Sep 04, 2008 at 11:40:03PM +0200, René Scharfe wrote:\n>>>>> Michael Dressel implemented an initial version and chose the \n>>>>> letter d, Junio suggested to add a leading space and \n>>>>> parentheses.\n>> \n>> Very nice. Only that I did not do the very first implementation it \n>> was Jeff King.\n> \n> I made a mistake. My last comment is wrong, There is an even  earlier\n> patch from Johannes Schindelin. Second there is no contribution left\n> from me. I'm merely a happy user of the new feature.\n\nHmm, when I wrote this commit message I didn't reread yours that\nmentioned Jeff.  The patch is already in next; I'm not sure if changing\nits commit message is a sensible option.  I remember that Dscho\nsuggested multiple times to steal his ideas, implement them and then\nreap all the credit for them, though. ;-)\n\nRené\n"}]}