{"thread":{"id":"17938","subject":"[RFC/PATCH] revision.c: add --format option for 'git log'","startedAt":"2009-02-21T15:26:55Z","lastAt":"2009-02-24T09:34:24Z","messageCount":23,"participants":["Felipe Contreras","Junio C Hamano","Linus Torvalds","Jakub Narebski","Wincent Colaiuta","Nanako Shiraishi","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105725","messageId":"1235230015-17641-1-git-send-email-felipe.contreras@gmail.com","threadId":"17938","inReplyTo":null,"subject":"[RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-21T15:26:55Z","receivedAt":"2009-02-21T15:26:55Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"--format=:foo is a shorthand for --pretty=tformat:foo, otherwise this\nnew option acts just like --pretty=foo, except it's more intuitive for\nusers of 'git log'.\n\nAs discussed in the mailing list, this is implemented as an undocumented\noption. The specifics of the implementation were suggested by Junio C\nHamano.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n revision.c |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex 286e416..6796e39 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1147,6 +1147,16 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t} else if (!prefixcmp(arg, \"--pretty=\")) {\n \t\trevs->verbose_header = 1;\n \t\tget_commit_format(arg+9, revs);\n+\t} else if (!prefixcmp(arg, \"--format=\")) {\n+\t\tchar *modified = NULL;\n+\t\trevs->verbose_header = 1;\n+\t\tif (arg[9] == ':') {\n+\t\t\tmodified = xmalloc(strlen(arg+9) + 7 + 1);\n+\t\t\tstrcpy(modified, \"tformat\");\n+\t\t\tstrcat(modified, arg+9);\n+\t\t}\n+\t\tget_commit_format(modified ? modified : arg+9, revs);\n+\t\tfree(modified);\n \t} else if (!strcmp(arg, \"--graph\")) {\n \t\trevs->topo_order = 1;\n \t\trevs->rewrite_parents = 1;\n-- \n1.6.1.3\n"},{"id":"105782","messageId":"7vtz6m1knv.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"1235230015-17641-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T16:49:40Z","receivedAt":"2009-02-22T16:49:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> --format=:foo is a shorthand for --pretty=tformat:foo, otherwise this\n> new option acts just like --pretty=foo, except it's more intuitive for\n> users of 'git log'.\n\nIt's been quite a long time since the earlier discussion, but I wonder why\nyou need the colon before \"foo\" for this new shorthand.  I *think* you are\nalso introducing \"--format=short\" as a synonym to \"--pretty=short\", but\nI do not think it is necessary.\n\n> As discussed in the mailing list, this is implemented as an undocumented\n> option.\n\nMaybe somebody wants to document it.\n\nNeeds trivial tests.\n\n> +\t} else if (!prefixcmp(arg, \"--format=\")) {\n> +\t\tchar *modified = NULL;\n> +\t\trevs->verbose_header = 1;\n> +\t\tif (arg[9] == ':') {\n> +\t\t\tmodified = xmalloc(strlen(arg+9) + 7 + 1);\n> +\t\t\tstrcpy(modified, \"tformat\");\n> +\t\t\tstrcat(modified, arg+9);\n> +\t\t}\n> +\t\tget_commit_format(modified ? modified : arg+9, revs);\n> +\t\tfree(modified);\n\n\tstruct strbuf fmt = STRBUF_INIT;\n        revs->verbose_header = 1;\n        strbuf_addf(&fmt, \"tformat:%s\", arg + 9);\n        get_commit_format(fmt.buf, revs);\n        strbuf_release(&fmt);\n\n>  \t} else if (!strcmp(arg, \"--graph\")) {\n>  \t\trevs->topo_order = 1;\n>  \t\trevs->rewrite_parents = 1;\n> -- \n> 1.6.1.3\n"},{"id":"105787","messageId":"94a0d4530902220918oc6f8ab9vc1fd0b55cad014a2@mail.gmail.com","threadId":"17938","inReplyTo":"7vtz6m1knv.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-22T17:18:12Z","receivedAt":"2009-02-22T17:18:12Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Feb 22, 2009 at 6:49 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> --format=:foo is a shorthand for --pretty=tformat:foo, otherwise this\n>> new option acts just like --pretty=foo, except it's more intuitive for\n>> users of 'git log'.\n>\n> It's been quite a long time since the earlier discussion, but I wonder why\n> you need the colon before \"foo\" for this new shorthand.  I *think* you are\n> also introducing \"--format=short\" as a synonym to \"--pretty=short\", but\n> I do not think it is necessary.\n\nWell, my hope was to replace --pretty=short with --format=short, but\nyou said that would break other scripts.\n\n>> As discussed in the mailing list, this is implemented as an undocumented\n>> option.\n>\n> Maybe somebody wants to document it.\n\nAh, I would gladly add the documentation, shall I write that it's an\n'alternative' option similar to --pretty?\n\n> Needs trivial tests.\n\nAll right.\n\n>> +     } else if (!prefixcmp(arg, \"--format=\")) {\n>> +             char *modified = NULL;\n>> +             revs->verbose_header = 1;\n>> +             if (arg[9] == ':') {\n>> +                     modified = xmalloc(strlen(arg+9) + 7 + 1);\n>> +                     strcpy(modified, \"tformat\");\n>> +                     strcat(modified, arg+9);\n>> +             }\n>> +             get_commit_format(modified ? modified : arg+9, revs);\n>> +             free(modified);\n>\n>        struct strbuf fmt = STRBUF_INIT;\n>        revs->verbose_header = 1;\n>        strbuf_addf(&fmt, \"tformat:%s\", arg + 9);\n>        get_commit_format(fmt.buf, revs);\n>        strbuf_release(&fmt);\n\nAh, I felt there must be a utility like that but I couldn't find\nexamples of that. Thanks.\n\n-- \nFelipe Contreras\n"},{"id":"105793","messageId":"7v63j2z7bh.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"94a0d4530902220918oc6f8ab9vc1fd0b55cad014a2@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T17:53:54Z","receivedAt":"2009-02-22T17:53:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> On Sun, Feb 22, 2009 at 6:49 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>\n>>> --format=:foo is a shorthand for --pretty=tformat:foo, otherwise this\n>>> new option acts just like --pretty=foo, except it's more intuitive for\n>>> users of 'git log'.\n>>\n>> It's been quite a long time since the earlier discussion, but I wonder why\n>> you need the colon before \"foo\" for this new shorthand.  I *think* you are\n>> also introducing \"--format=short\" as a synonym to \"--pretty=short\", but\n>> I do not think it is necessary.\n>\n> Well, my hope was to replace --pretty=short with --format=short, but\n> you said that would break other scripts.\n\nIt is not just scripts you break.  You also break people's trained\nfingers.\n\nYou can specify the kind of canned pretty printing with --pretty=short,\nand it is not any longer to type than --format.  For use in scripts that\nyou write once and forget, there is no need to even apply this patch.\n\nThe only reason why new --format=<fmt> could be an useful addition is\nbecause --pretty=format:<fmt> may be too long to type interactively.\n\n>>> As discussed in the mailing list, this is implemented as an undocumented\n>>> option.\n>>\n>> Maybe somebody wants to document it.\n>\n> Ah, I would gladly add the documentation, shall I write that it's an\n> 'alternative' option similar to --pretty?\n\nI do not think we want to introduce a new way to say the same thing for\nthe canned short options; \"alternative\" is not a good word for it.\n\nPutting it in another way...\n\nThe output format is controlled by --pretty, which knows a set of canned\noutput formats.  You can specify --format=<fmt> if you want something\ndifferent from any of the canned format.  If your git does not support\nthis new notation, you can say --pretty=tformat:<fmt> to get the same\neffect.  The old --pretty=tformat:<fmt> (and --pretty=format:<fmt>) is not\ndeprecated in any way.\n"},{"id":"105794","messageId":"7vy6vyxs6j.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"7v63j2z7bh.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T18:06:12Z","receivedAt":"2009-02-22T18:06:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n> ...\n>> Well, my hope was to replace --pretty=short with --format=short, but\n>> you said that would break other scripts.\n>\n> It is not just scripts you break.  You also break people's trained\n> fingers.\n> ...\n> The only reason why new --format=<fmt> could be an useful addition is\n> because --pretty=format:<fmt> may be too long to type interactively.\n\nAn obvious alternative with lessor impact than your patch would be not to\nintroduce an additional option --format, but just make \":\" as a synonym to\n\"tformat:\".  Then you can say \"--pretty=:%h %s\".  You would need to type\none colon more but that might conceptually be less confusing, when\nsomebody is starting to learn git *after* this change, without knowing\nthat we did not have --format in earlier versions, from the documentation\nand existing pages on various web sites.\n"},{"id":"105802","messageId":"94a0d4530902221014i46e52542j2380386405b559e2@mail.gmail.com","threadId":"17938","inReplyTo":"7v63j2z7bh.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-22T18:14:09Z","receivedAt":"2009-02-22T18:14:09Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Feb 22, 2009 at 7:53 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> On Sun, Feb 22, 2009 at 6:49 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>>\n>>>> --format=:foo is a shorthand for --pretty=tformat:foo, otherwise this\n>>>> new option acts just like --pretty=foo, except it's more intuitive for\n>>>> users of 'git log'.\n>>>\n>>> It's been quite a long time since the earlier discussion, but I wonder why\n>>> you need the colon before \"foo\" for this new shorthand.  I *think* you are\n>>> also introducing \"--format=short\" as a synonym to \"--pretty=short\", but\n>>> I do not think it is necessary.\n>>\n>> Well, my hope was to replace --pretty=short with --format=short, but\n>> you said that would break other scripts.\n>\n> It is not just scripts you break.  You also break people's trained\n> fingers.\n>\n> You can specify the kind of canned pretty printing with --pretty=short,\n> and it is not any longer to type than --format.  For use in scripts that\n> you write once and forget, there is no need to even apply this patch.\n>\n> The only reason why new --format=<fmt> could be an useful addition is\n> because --pretty=format:<fmt> may be too long to type interactively.\n\nThat's not the main reason I suggested the change.\n\nAt least to me (and other people agreed on the original thread), when\nI want to see the output of 'git log' in a different format the first\nthing that pops into my mind is 'git log --format=foo'. The other\ncommand I can recall right now that has something similar is 'find',\nwhich has a 'printf' option, but 'find' can do much more than just\noutput stuff, like -delete, 'git log' on the other hand only prints\nstuff, so --printf would not make sense, so only the f (format)\nremains.\n\n'git log --pretty=foo' is very unintuitive, no one would ever find\nthat option by intuition. Are there different kinds of pretties? Is\nthe default behavior --ugly?\n\nMaybe 'git log --pretty' makes sense, but not 'git log --pretty=medium'.\n\n>>>> As discussed in the mailing list, this is implemented as an undocumented\n>>>> option.\n>>>\n>>> Maybe somebody wants to document it.\n>>\n>> Ah, I would gladly add the documentation, shall I write that it's an\n>> 'alternative' option similar to --pretty?\n>\n> I do not think we want to introduce a new way to say the same thing for\n> the canned short options; \"alternative\" is not a good word for it.\n>\n> Putting it in another way...\n>\n> The output format is controlled by --pretty, which knows a set of canned\n> output formats.  You can specify --format=<fmt> if you want something\n> different from any of the canned format.  If your git does not support\n> this new notation, you can say --pretty=tformat:<fmt> to get the same\n> effect.  The old --pretty=tformat:<fmt> (and --pretty=format:<fmt>) is not\n> deprecated in any way.\n\nAgain, I don't see why 'canned format' == 'pretty' while 'custom\nformat' == 'format'. All this wording seems to suggest the canned\nformats are pretty, while the custom formats are not.\n\nI understand the option should be kept for people that are used to it,\nbut I don't think new users should suffer because of historic reasons.\nAnd actually I believe many current users would not find\n--pretty=email more natural than --format=email.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"105809","messageId":"7vbpsuxqpo.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"94a0d4530902221014i46e52542j2380386405b559e2@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-22T18:37:55Z","receivedAt":"2009-02-22T18:37:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> I understand the option should be kept for people that are used to it,\n\nIt is not just that.  New people should learn existing lingo, as that is\nthe word used in the existing documentation and various random web pages,\nso that they can use the same language when they teach people who are\nnewer than themselves.\n\nIf the existing word was not pretty (that came from \"pretty-formatting\")\nbut something unpronouncible like '--gzxfw=short\", then your argument\nmight make some sense, but there is no such \"breakage we need to fix\"\nhere.\n"},{"id":"105812","messageId":"94a0d4530902221055g4e815a78oc0aa094304588ab7@mail.gmail.com","threadId":"17938","inReplyTo":"7vbpsuxqpo.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-22T18:55:46Z","receivedAt":"2009-02-22T18:55:46Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Feb 22, 2009 at 8:37 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> I understand the option should be kept for people that are used to it,\n>\n> It is not just that.  New people should learn existing lingo, as that is\n> the word used in the existing documentation and various random web pages,\n> so that they can use the same language when they teach people who are\n> newer than themselves.\n\nYes, but the existing lingo is not perfect... I'm proposing this\nparticular lingo to be changed.\n\n> If the existing word was not pretty (that came from \"pretty-formatting\")\n> but something unpronouncible like '--gzxfw=short\", then your argument\n> might make some sense, but there is no such \"breakage we need to fix\"\n> here.\n\nIt's not breakage that needs to be fixed, it's UI improvement, and one\nguideline is that the interface needs to be intuitive and natural\n(when possible). IMO pretty > gzxfw, but format > pretty. Don't you\nthink that --format=email is more natural than --pretty=email? I think\nyou are holding a bit too tight on the code reason why it's called\n--pretty, but users shouldn't need to see the code in order to\nunderstand why the naming of the options in git commands make sense.\n\n-- \nFelipe Contreras\n"},{"id":"105821","messageId":"alpine.LFD.2.00.0902221225080.3111@localhost.localdomain","threadId":"17938","inReplyTo":"94a0d4530902221014i46e52542j2380386405b559e2@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2009-02-22T20:34:08Z","receivedAt":"2009-02-22T20:34:08Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 22 Feb 2009, Felipe Contreras wrote:\n>\n> 'git log --pretty=foo' is very unintuitive, no one would ever find\n> that option by intuition. Are there different kinds of pretties? Is\n> the default behavior --ugly?\n\nHistorically, the default behaviour _was_ indeed --ugly.\n\nThere was no native \"git log\" command per se, it was literally a script \nthat did something like\n\n\tgit-rev-list <rev-opts> |\n\t\tgit-diff-tree --stdin --pretty |\n\t\t$(PAGER)\n\nand the \"--pretty\" option was to tell git to give human-readable output \nfrom git-diff-tree rather than the harsh raw stuff.\n\nSo yes, the default for git used to be \"low-level plumbing commands for \nscripting\", with some options to turn them pretty for the fleshies.\n\nThen we started having more options, so \"--pretty\" became \"--pretty=xyz\".\n\nBut I do realize that without the historical background, none of this \nmakes sense. And quite frankly, I do hate \"--pretty=xyz\" myself. I find \nmyself wishing I could just write\n\n\tgit log --oneline\n\ninstead of \"--pretty=oneline\", and I wish \"shortlog\" was a pretty format \ninstead of a command of its own.\n\nSo at least personally, I would not object AT ALL to\n\n - leave the \"--pretty=xyz\" parsing for historical reasons\n\n - support \"--format=xyz\" too, because it does make sense (and it's \n   unambiguous: a format without a '%' sign in it makes no sense, so there \n   is no reason to have \"--format=format:%s\"\n\n - if we see an unrecognized \"--<option>\", and the <option> is a format \n   name, just assume the user was lazy and couldn't be bothered to write \n   out \"format=\"\n\nand then for extra bonus points, make \"shortlog\" work as a format too.\n\n\t\t\tLinus\n"},{"id":"105825","messageId":"m3bpsurui3.fsf@localhost.localdomain","threadId":"17938","inReplyTo":"alpine.LFD.2.00.0902221225080.3111@localhost.localdomain","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-02-22T22:12:42Z","receivedAt":"2009-02-22T22:12:42Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n[...]\n\n> and then for extra bonus points, make \"shortlog\" work as a format too.\n\nWell, shortlog is a bit different as it reorders and summarizes log\ninformation.  But if --stat is format of diff, then I guess shortlog\n(future log --format=summary) is a format for log...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"105866","messageId":"7vljrxveqa.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"94a0d4530902221055g4e815a78oc0aa094304588ab7@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-23T06:39:41Z","receivedAt":"2009-02-23T06:39:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> It's not breakage that needs to be fixed, it's UI improvement,...\n> ... Don't you\n> think that --format=email is more natural than --pretty=email?\n\nThat heavily depends on when you ask.\n\nIf it _were_ during the period when we were actively building this\nbikeshed, then I would have said \"yeah, that color looks prettier\".\n\nBut a proposal to repaint the bikeshed in a different color long after it\nwas built needs to be supported by an argument that is much stronger than\n\"I do not like the current one, I am improving it by painting in a better\ncolor.\"  IOW, you came too late to just bikeshed.\n\nPeople already are used to finding the shed in the scenery by looking for\nthat original color, however ugly the color might be.  The answer to your\nquestion has to become quite different when you take that into account;\notherwise you are being irresponsible to your users.\n\nThis falls into the \"it would have been very nice if it were like that\nfrom day one.  I'd happily agree with you,... only if we didn't do it the\nway we originally did\" category.  You cannot call such a change an\nimprovement without thinking why the above statement is heavily qualified\nwith \"if it were\" and \"only if we didn't\".\n\nI am actually Ok with having a synonym --format that works *identically*\nwith how --pretty works, and then update how both of them work to make\nthem better perhaps in a follow-up patch.  You accept style names that you\nrecognize as before, and instead of erroring out, if the unrecognized\nstring has % in it, pretend as if \"tformat:\" was in front of it.  It still\nhas the \"two keywords for the same thing\" misfortune, but that is\nsomething you cannot avoid.  You yourself would need to say \"newer git\nwould accept --format=short, but with the version shipped by your\ndistribution you may have to say --pretty instead\" when teaching new\npeople who come after you.  Hopefully not many people would complain as\nlong as you do not break the existing --pretty,\n\nAlso I like Linus's --oneline === --pretty=oneline, but I haven't audited\nthe list of double-dash options our commands take that are unrelated to\npretty-printing styles.  If there are ones that look or sound similar to\nthe recognized style names (or if some commands may want to use the word\nfor controlling their own operation that is not related to pretty-printing\nin their future enhancement), it would cause grief to us down the road.\nThe only one I can think of offhand is --full, so this probably is Ok.\n"},{"id":"105891","messageId":"4F48B127-49B0-4592-BE6F-04A46D061030@wincent.com","threadId":"17938","inReplyTo":"alpine.LFD.2.00.0902221225080.3111@localhost.localdomain","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2009-02-23T09:55:57Z","receivedAt":"2009-02-23T09:55:57Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 22/2/2009, a las 21:34, Linus Torvalds escribió:\n\n> But I do realize that without the historical background, none of this\n> makes sense. And quite frankly, I do hate \"--pretty=xyz\" myself. I  \n> find\n> myself wishing I could just write\n>\n> \tgit log --oneline\n>\n> instead of \"--pretty=oneline\", and I wish \"shortlog\" was a pretty  \n> format\n> instead of a command of its own.\n\n\nWhy not an alias then?\n\n\tgit oneline\n\nie. something like this, which I have in my config:\n\n\talias.oneline=log --pretty=oneline --abbrev-commit\n\nCheers,\nWincent\n"},{"id":"105947","messageId":"94a0d4530902231656l71ee0e45nbdd1c20035d3dd4@mail.gmail.com","threadId":"17938","inReplyTo":"7vljrxveqa.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-24T00:56:41Z","receivedAt":"2009-02-24T00:56:41Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Mon, Feb 23, 2009 at 8:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> It's not breakage that needs to be fixed, it's UI improvement,...\n>> ... Don't you\n>> think that --format=email is more natural than --pretty=email?\n>\n> That heavily depends on when you ask.\n>\n> If it _were_ during the period when we were actively building this\n> bikeshed, then I would have said \"yeah, that color looks prettier\".\n>\n> But a proposal to repaint the bikeshed in a different color long after it\n> was built needs to be supported by an argument that is much stronger than\n> \"I do not like the current one, I am improving it by painting in a better\n> color.\"  IOW, you came too late to just bikeshed.\n>\n> People already are used to finding the shed in the scenery by looking for\n> that original color, however ugly the color might be.  The answer to your\n> question has to become quite different when you take that into account;\n> otherwise you are being irresponsible to your users.\n\nThe color of a bikeshed is essentially irrelevant, red vs blue makes\nalmost no difference. Are you suggesting that --pretty and --format\nare essentially the same and therefore arguing about one vs the other\nis a waste of time?\n\nWords have associated meaning, choosing one over the other makes a big\ndifference, sometimes huge. Image what would have happened if\nprogramming languages would have chosen 'check' instead of 'if'...\n\n> This falls into the \"it would have been very nice if it were like that\n> from day one.  I'd happily agree with you,... only if we didn't do it the\n> way we originally did\" category.  You cannot call such a change an\n> improvement without thinking why the above statement is heavily qualified\n> with \"if it were\" and \"only if we didn't\".\n\nI'm saying we should be in point B (--format), you are saying we are\nalready in point A (--pretty), it would have been nicer to choose B\nsince day one, but we didn't.\n\nI'm still saying we should be in point B, even if the path from A to B\nis unclear, and maybe tedious, it's still an improvement, and as such\nit must be done eventually.\n\nAFAIK git's user interface is one of the big areas for improvement,\nand a common complaint from anti-gitters... this is an example of one\nof the issues.\n\nPerhaps there should be a way to handle this \"it would have been very\nnice if it were like that from day one\" cases, maybe queue the patches\non a separate branch until some big release? 1.7.x? Or maybe in the\nmeantime generate a warning: X is deprecated, please use Y instead.\n\nThe issue that comes into my mind is the old 'git-foo' format. The\nswitch wasn't handled correctly according to many people... most users\nnoticed until it was very late. That's why deprecation warnings make\nsense.\n\n> I am actually Ok with having a synonym --format that works *identically*\n> with how --pretty works, and then update how both of them work to make\n> them better perhaps in a follow-up patch.  You accept style names that you\n> recognize as before, and instead of erroring out, if the unrecognized\n> string has % in it, pretend as if \"tformat:\" was in front of it.  It still\n> has the \"two keywords for the same thing\" misfortune, but that is\n> something you cannot avoid.  You yourself would need to say \"newer git\n> would accept --format=short, but with the version shipped by your\n> distribution you may have to say --pretty instead\" when teaching new\n> people who come after you.  Hopefully not many people would complain as\n> long as you do not break the existing --pretty,\n\nI would rather say --pretty is history, if you have 1.7.x, use --format.\n\n> Also I like Linus's --oneline === --pretty=oneline, but I haven't audited\n> the list of double-dash options our commands take that are unrelated to\n> pretty-printing styles.  If there are ones that look or sound similar to\n> the recognized style names (or if some commands may want to use the word\n> for controlling their own operation that is not related to pretty-printing\n> in their future enhancement), it would cause grief to us down the road.\n> The only one I can think of offhand is --full, so this probably is Ok.\n\nYeah, I would like --oneline too.\n\n-- \nFelipe Contreras\n"},{"id":"105948","messageId":"94a0d4530902231703n701a17dbkd20c0e14d759dddf@mail.gmail.com","threadId":"17938","inReplyTo":"94a0d4530902231656l71ee0e45nbdd1c20035d3dd4@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-24T01:03:48Z","receivedAt":"2009-02-24T01:03:48Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Feb 24, 2009 at 2:56 AM, Felipe Contreras\n<felipe.contreras@gmail.com> wrote:\n> On Mon, Feb 23, 2009 at 8:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>\n>>> It's not breakage that needs to be fixed, it's UI improvement,...\n>>> ... Don't you\n>>> think that --format=email is more natural than --pretty=email?\n>>\n>> That heavily depends on when you ask.\n>>\n>> If it _were_ during the period when we were actively building this\n>> bikeshed, then I would have said \"yeah, that color looks prettier\".\n>>\n>> But a proposal to repaint the bikeshed in a different color long after it\n>> was built needs to be supported by an argument that is much stronger than\n>> \"I do not like the current one, I am improving it by painting in a better\n>> color.\"  IOW, you came too late to just bikeshed.\n>>\n>> People already are used to finding the shed in the scenery by looking for\n>> that original color, however ugly the color might be.  The answer to your\n>> question has to become quite different when you take that into account;\n>> otherwise you are being irresponsible to your users.\n\nPeople somehow got used to the ugly color, they'll get used to the\npretty one, in fact, they would probably like it better, and maybe\neven thought more than once on changing it.\n\nIf they're the kind of people that don't like new things they'll\nprobably not be using git anyway.\n\n-- \nFelipe Contreras\n"},{"id":"105951","messageId":"7v3ae4r53f.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"94a0d4530902231703n701a17dbkd20c0e14d759dddf@mail.gmail.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-24T01:33:40Z","receivedAt":"2009-02-24T01:33:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n>>> People already are used to finding the shed in the scenery by looking for\n>>> that original color, however ugly the color might be.  The answer to your\n>>> question has to become quite different when you take that into account;\n>>> otherwise you are being irresponsible to your users.\n>\n> People somehow got used to the ugly color, they'll get used to the\n> pretty one, in fact, they would probably like it better, and maybe\n> even thought more than once on changing it.\n>\n> If they're the kind of people that don't like new things they'll\n> probably not be using git anyway.\n\nYou do not have to send two messages in a row to reaffirm that you are of\nirresponsible kind.  I heard you enough already.\n\nGo away.\n"},{"id":"105959","messageId":"20090224105528.6117@nanako3.lavabit.com","threadId":"17938","inReplyTo":"7v3ae4r53f.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-02-24T01:55:28Z","receivedAt":"2009-02-24T01:55:28Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com>:\n\n>\n>>>> People already are used to finding the shed in the scenery by looking for\n>>>> that original color, however ugly the color might be.  The answer to your\n>>>> question has to become quite different when you take that into account;\n>>>> otherwise you are being irresponsible to your users.\n>>\n>> People somehow got used to the ugly color, they'll get used to the\n>> pretty one, in fact, they would probably like it better, and maybe\n>> even thought more than once on changing it.\n>>\n>> If they're the kind of people that don't like new things they'll\n>> probably not be using git anyway.\n>\n> You do not have to send two messages in a row to reaffirm that you are of\n> irresponsible kind.  I heard you enough already.\n>\n> Go away.\n\nJunio, what got into you?\n\nI've always admired your calm and reasoned way to deal with even the most obnoxious people, and unlike more abrasive people on this list I've never seen you say \"Go away\" to anybody here.\n\nEspecially because I agree with you that calling pretty-printing as \"pretty\" isn't so broken to make such a big deal out of, it would be better not to chase a potentially useful contributor away on such a minor issue.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"105968","messageId":"20090224130626.6117@nanako3.lavabit.com","threadId":"17938","inReplyTo":"7v3ae4r53f.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Add --format that is a synonym to --pretty","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-02-24T04:06:26Z","receivedAt":"2009-02-24T04:06:26Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Some people prefer to call the pretty-print styles \"format\", and get\nannoyed to see \"git log --format=short\" fail.  Introduce it as a synonym\nto --pretty so that both can be used interchangeably without breaking\nexamples in existing web pages or ppeople's expectations.\n\nHaving to say --format=\"format:%h %s\" is redundant because none of the\npredefined pretty-print styles have per-cent sign in it, so this patch\nalso makes it possible to say --pretty=\"%h %s\" (and --format=\"%h %s\").\n\nSigned-off-by: Nanako Shiraishi <nanako3@lavabit.com>\n---\n\nI think doing it this way won't risk any compatibility issue.\nPlease be gentle; this is my first real patch in the C language.\n\n Documentation/pretty-formats.txt |    9 +++++++++\n Documentation/pretty-options.txt |    1 +\n pretty.c                         |   20 ++++++++++++++------\n revision.c                       |    2 +-\n 4 files changed, 25 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt\nindex 159390c..5c6e678 100644\n--- a/Documentation/pretty-formats.txt\n+++ b/Documentation/pretty-formats.txt\n@@ -152,3 +152,12 @@ $ git log -2 --pretty=tformat:%h 4da45bef \\\n 4da45be\n 7134973\n ---------------------\n++\n+In addition, any unrecognized string that has a `%` in it is interpreted\n+as if it has `tformat:` in front of it.  For example, these two are\n+equivalent:\n++\n+---------------------\n+$ git log -2 --pretty=tformat:%h 4da45bef\n+$ git log -2 --pretty=%h 4da45bef\n+---------------------\ndiff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt\nindex 5f21efe..6596019 100644\n--- a/Documentation/pretty-options.txt\n+++ b/Documentation/pretty-options.txt\n@@ -1,4 +1,5 @@\n --pretty[='<format>']::\n+--format[='<format>']::\n \n \tPretty-print the contents of the commit logs in a given format,\n \twhere '<format>' can be one of 'oneline', 'short', 'medium',\ndiff --git a/pretty.c b/pretty.c\nindex 6cd9149..d739f6d 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -10,6 +10,15 @@\n \n static char *user_format;\n \n+static void save_user_format(struct rev_info *rev, const char *cp, int is_tformat)\n+{\n+\tfree(user_format);\n+\tuser_format = xstrdup(cp);\n+\tif (is_tformat)\n+\t\trev->use_terminator = 1;\n+\trev->commit_format = CMIT_FMT_USERFORMAT;\n+}\n+\n void get_commit_format(const char *arg, struct rev_info *rev)\n {\n \tint i;\n@@ -33,12 +42,7 @@ void get_commit_format(const char *arg, struct rev_info *rev)\n \t\treturn;\n \t}\n \tif (!prefixcmp(arg, \"format:\") || !prefixcmp(arg, \"tformat:\")) {\n-\t\tconst char *cp = strchr(arg, ':') + 1;\n-\t\tfree(user_format);\n-\t\tuser_format = xstrdup(cp);\n-\t\tif (arg[0] == 't')\n-\t\t\trev->use_terminator = 1;\n-\t\trev->commit_format = CMIT_FMT_USERFORMAT;\n+\t\tsave_user_format(rev, strchr(arg, ':') + 1, arg[0] == 't');\n \t\treturn;\n \t}\n \tfor (i = 0; i < ARRAY_SIZE(cmt_fmts); i++) {\n@@ -50,6 +54,10 @@ void get_commit_format(const char *arg, struct rev_info *rev)\n \t\t\treturn;\n \t\t}\n \t}\n+\tif (strchr(arg, '%')) {\n+\t\tsave_user_format(rev, arg, 1);\n+\t\treturn;\n+\t}\n \n \tdie(\"invalid --pretty format: %s\", arg);\n }\ndiff --git a/revision.c b/revision.c\nindex 286e416..556c319 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1144,7 +1144,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t} else if (!strcmp(arg, \"--pretty\")) {\n \t\trevs->verbose_header = 1;\n \t\tget_commit_format(arg+8, revs);\n-\t} else if (!prefixcmp(arg, \"--pretty=\")) {\n+\t} else if (!prefixcmp(arg, \"--pretty=\") || !prefixcmp(arg, \"--format=\")) {\n \t\trevs->verbose_header = 1;\n \t\tget_commit_format(arg+9, revs);\n \t} else if (!strcmp(arg, \"--graph\")) {\n-- \n1.6.2.rc1\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"105969","messageId":"20090224045041.GA4615@coredump.intra.peff.net","threadId":"17938","inReplyTo":"20090224130626.6117@nanako3.lavabit.com","subject":"Re: [PATCH] Add --format that is a synonym to --pretty","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-02-24T04:50:41Z","receivedAt":"2009-02-24T04:50:41Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 24, 2009 at 01:06:26PM +0900, Nanako Shiraishi wrote:\n\n> Some people prefer to call the pretty-print styles \"format\", and get\n> annoyed to see \"git log --format=short\" fail.  Introduce it as a synonym\n> to --pretty so that both can be used interchangeably without breaking\n> examples in existing web pages or ppeople's expectations.\n\nThinking about this in context of the proposal to support --oneline (et\nal), I think this part by itself gives confusing behavior. That is,\n--pretty=oneline can be shortened to --oneline, but --pretty=format:$x\ncannot be shortened to --format=$x.\n\nBut that is modified by what happens next:\n\n> Having to say --format=\"format:%h %s\" is redundant because none of the\n> predefined pretty-print styles have per-cent sign in it, so this patch\n> also makes it possible to say --pretty=\"%h %s\" (and --format=\"%h %s\").\n\nThis implies that --format=$x is equivalent to --pretty=format:$x, but\nthe patch actually implements the equivalent of --pretty=tformat:$x.\n\nSo that raises two concerns:\n\n  1. We have to pick one as the \"most common\" for this shorthand; are we\n     sure tformat is it? (Personally, I think it is, but I think it is a\n     subtle point which we should be sure of).\n\n  2. This _almost_ fixes the point I raised above. That is, --format=$x\n     would match its longer --pretty=format:$x counterpart. Except that\n     --format does _tformat_, which I would have expected to get via\n     --tformat under such a proposal.\n\n-Peff\n"},{"id":"105974","messageId":"7vprh8mm9k.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"20090224045041.GA4615@coredump.intra.peff.net","subject":"Re: [PATCH] Add --format that is a synonym to --pretty","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-24T05:33:59Z","receivedAt":"2009-02-24T05:33:59Z","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 Tue, Feb 24, 2009 at 01:06:26PM +0900, Nanako Shiraishi wrote:\n>\n>> Some people prefer to call the pretty-print styles \"format\", and get\n>> annoyed to see \"git log --format=short\" fail.  Introduce it as a synonym\n>> to --pretty so that both can be used interchangeably without breaking\n>> examples in existing web pages or ppeople's expectations.\n>\n> Thinking about this in context of the proposal to support --oneline (et\n> al), I think this part by itself gives confusing behavior. That is,\n> --pretty=oneline can be shortened to --oneline, but --pretty=format:$x\n> cannot be shortened to --format=$x.\n>\n> But that is modified by what happens next:\n>\n>> Having to say --format=\"format:%h %s\" is redundant because none of the\n>> predefined pretty-print styles have per-cent sign in it, so this patch\n>> also makes it possible to say --pretty=\"%h %s\" (and --format=\"%h %s\").\n>\n> This implies that --format=$x is equivalent to --pretty=format:$x, but\n> the patch actually implements the equivalent of --pretty=tformat:$x.\n>\n> So that raises two concerns:\n>\n>   1. We have to pick one as the \"most common\" for this shorthand; are we\n>      sure tformat is it? (Personally, I think it is, but I think it is a\n>      subtle point which we should be sure of).\n>\n>   2. This _almost_ fixes the point I raised above. That is, --format=$x\n>      would match its longer --pretty=format:$x counterpart. Except that\n>      --format does _tformat_, which I would have expected to get via\n>      --tformat under such a proposal.\n\nI think the patch suffers from the same problem Felipe's patch had, by\nconflating two issues.  Because it had the \":some string with %\" shorthand\nsupport in addition to \"--format is another way to spell --pretty\", and it\ndid that only to \"--format\" side, I initially misunderstood Felipe's patch\nas primarily addressing \"Why do we have to say '--pretty=format:%h %s'\nwhen it is obvious from the context that '%h %s' is a format\".  It turns\nout that he did not like \"pretty\" and wanted to be able to say \"format\"\neven for the predefined pretty-print styles.\n\nIf we split this round into two patches, one that makes --format a synonym\nto --pretty, and then another one that allows --{format,pretty}='%h %s',\nand *stop there*, then we wouldn't have difficulties.\n\nI do not think --oneline is a bad idea, but I do not think we should\nexplain it as \"You can write anything that you can write after '--pretty='\nwithout 'pretty=' and they mean the same thing\".  That's where your\nconcern arises from.  You just say \"'--pretty=oneline --abbrev-commit' is\nso often used, so we have a shorthand for the whole thing: --oneline\",\nwithout implying anything about other things such as --short or --tformat.\n"},{"id":"105978","messageId":"20090224054524.GE4615@coredump.intra.peff.net","threadId":"17938","inReplyTo":"7vprh8mm9k.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add --format that is a synonym to --pretty","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-02-24T05:45:24Z","receivedAt":"2009-02-24T05:45:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 23, 2009 at 09:33:59PM -0800, Junio C Hamano wrote:\n\n> I think the patch suffers from the same problem Felipe's patch had, by\n> conflating two issues.  Because it had the \":some string with %\" shorthand\n\nYes, I totally agree they are two separate issues, and it should be two\npatches.\n\n> If we split this round into two patches, one that makes --format a synonym\n> to --pretty, and then another one that allows --{format,pretty}='%h %s',\n> and *stop there*, then we wouldn't have difficulties.\n\nRight, and I am OK with that. I just wanted to make sure we were not\npainting ourselves into a corner for a \"patch 3/2\" that has been\ndiscussed.\n\n> I do not think --oneline is a bad idea, but I do not think we should\n> explain it as \"You can write anything that you can write after '--pretty='\n> without 'pretty=' and they mean the same thing\".  That's where your\n> concern arises from.  You just say \"'--pretty=oneline --abbrev-commit' is\n> so often used, so we have a shorthand for the whole thing: --oneline\",\n> without implying anything about other things such as --short or --tformat.\n\nOK. I think that is reasonable. Personally, I would really only care\nabout --oneline, anyway (and I do think a --pretty=%h shorthand should\nuse \"tformat\"; the extra typing is probably not a big deal if you are\ndoing a big multi-line format).\n\n-Peff\n"},{"id":"105997","messageId":"7vzlgcjmch.fsf@gitster.siamese.dyndns.org","threadId":"17938","inReplyTo":"20090224105528.6117@nanako3.lavabit.com","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-24T08:00:30Z","receivedAt":"2009-02-24T08:00:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Quoting Junio C Hamano <gitster@pobox.com>:\n>\n>>>>> People already are used to finding the shed in the scenery by looking for\n>>>>> that original color, however ugly the color might be.  The answer to your\n>>>>> question has to become quite different when you take that into account;\n>>>>> otherwise you are being irresponsible to your users.\n>>>\n>>> People somehow got used to the ugly color, they'll get used to the\n>>> pretty one, in fact, they would probably like it better,...\n>>\n>> You do not have to send two messages in a row to reaffirm that you are of\n>> irresponsible kind.  I heard you enough already.\n>>\n>> Go away.\n>\n> Junio, what got into you?\n>\n> I've always admired your calm and reasoned way to deal with even the\n> most obnoxious people, and unlike more abrasive people on this list I've\n> never seen you say \"Go away\" to anybody here.\n>\n> Especially because I agree with you that calling pretty-printing as\n> \"pretty\" isn't so broken to make such a big deal out of, it would be\n> better not to chase a potentially useful contributor away on such a\n> minor issue.\n\nI may try to be more diplomatic than other people, but it does not mean I\ndo not reserve the right to get annoyed enough from time to time.\n\nWhen you hear people complain, and you take a poll and see there are many\npeople who agree with you, a naive thing to do is to assume that you now\ngot the majority vote.  Over time, you will learn that majority were\nhappy, were not complaining, and they merely did not bother to object to\nthe complainers who want to change things.  And the last thing you want is\nto find these things out the hard way by bringing a sudden change to them\nand giving them something to compalin about, like we did with 1.6.0.  You\nneed to learn to take \"let's improve this thing, as many people want it\"\nwith a huge grain of salt.\n\nThis cannot be stressed enough; if somebody is incapable of understanding\nit, then we would be better off without him or her.\n\nI am not so worried about losing Felipe as a contributor, not because I do\nnot think he is useful, but because I do not think he is stupid.\n\nJudging from his other patches, I think he is reasonably capable and\nintelligent, but just is not experienced enough with the culture around\nhere, especially about taking the existing users extremely seriously.  The\nfirst patch landed in the git tree from him was in January 2009---perhaps\nI should have tried to be more diplomatic with him as a newcomer for a bit\nlonger, but I am reasonably sure that he is smart enough to realize the\nimportance of different acceptance criteria between new features and\nchanges to existing interfaces after having time to think about it for a\nfew days, and will come back.\n"},{"id":"106000","messageId":"94a0d4530902240035n1145f4b7k25cd6bdf1123028@mail.gmail.com","threadId":"17938","inReplyTo":"7v3ae4r53f.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-24T08:35:17Z","receivedAt":"2009-02-24T08:35:17Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Feb 24, 2009 at 3:33 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>>>> People already are used to finding the shed in the scenery by looking for\n>>>> that original color, however ugly the color might be.  The answer to your\n>>>> question has to become quite different when you take that into account;\n>>>> otherwise you are being irresponsible to your users.\n>>\n>> People somehow got used to the ugly color, they'll get used to the\n>> pretty one, in fact, they would probably like it better, and maybe\n>> even thought more than once on changing it.\n>>\n>> If they're the kind of people that don't like new things they'll\n>> probably not be using git anyway.\n>\n> You do not have to send two messages in a row to reaffirm that you are of\n> irresponsible kind.  I heard you enough already.\n>\n> Go away.\n\nAfter sending the email I realized I didn't answer your argument about\npeople already used to the existing stuff.\n\nI might sound too aggressive on email, but my intention is not to\nattack anything or anybody, just improve things.\n\n-- \nFelipe Contreras\n"},{"id":"106014","messageId":"94a0d4530902240134v3e7d6c73n37252a80180bd785@mail.gmail.com","threadId":"17938","inReplyTo":"7vzlgcjmch.fsf@gitster.siamese.dyndns.org","subject":"Re: [RFC/PATCH] revision.c: add --format option for 'git log'","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2009-02-24T09:34:24Z","receivedAt":"2009-02-24T09:34:24Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Feb 24, 2009 at 10:00 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Nanako Shiraishi <nanako3@lavabit.com> writes:\n>\n>> Quoting Junio C Hamano <gitster@pobox.com>:\n>>\n>>>>>> People already are used to finding the shed in the scenery by looking for\n>>>>>> that original color, however ugly the color might be.  The answer to your\n>>>>>> question has to become quite different when you take that into account;\n>>>>>> otherwise you are being irresponsible to your users.\n>>>>\n>>>> People somehow got used to the ugly color, they'll get used to the\n>>>> pretty one, in fact, they would probably like it better,...\n>>>\n>>> You do not have to send two messages in a row to reaffirm that you are of\n>>> irresponsible kind.  I heard you enough already.\n>>>\n>>> Go away.\n>>\n>> Junio, what got into you?\n>>\n>> I've always admired your calm and reasoned way to deal with even the\n>> most obnoxious people, and unlike more abrasive people on this list I've\n>> never seen you say \"Go away\" to anybody here.\n>>\n>> Especially because I agree with you that calling pretty-printing as\n>> \"pretty\" isn't so broken to make such a big deal out of, it would be\n>> better not to chase a potentially useful contributor away on such a\n>> minor issue.\n>\n> I may try to be more diplomatic than other people, but it does not mean I\n> do not reserve the right to get annoyed enough from time to time.\n>\n> When you hear people complain, and you take a poll and see there are many\n> people who agree with you, a naive thing to do is to assume that you now\n> got the majority vote.  Over time, you will learn that majority were\n> happy, were not complaining, and they merely did not bother to object to\n> the complainers who want to change things.  And the last thing you want is\n> to find these things out the hard way by bringing a sudden change to them\n> and giving them something to compalin about, like we did with 1.6.0.  You\n> need to learn to take \"let's improve this thing, as many people want it\"\n> with a huge grain of salt.\n>\n> This cannot be stressed enough; if somebody is incapable of understanding\n> it, then we would be better off without him or her.\n\nI've discussed with many people regarding git; git-haters, people that\ndon't care about vcs, new git users, etc. So you might say that I have\nan 'outsider' point of view, that shouldn't necessarily be a bad\nthing.\n\nThe 'problems' about git that I've heard is that #1 lack of win32\nsupport (now fixed), #2 complicated user interface (fixable), #3 lack\nof storing renames (yes, people do complain about that). I don't\nreally care about #3, but I do care about #2.\n\nNow, a google for 'git user interface' returns a few interesting\nresults, and one of them is Jon Loeliger asking for more grained\ndetail about the areas of improvement in the Git Survey, but somehow\nnobody listened and now we don't have any nice graph about people\nwanting UI improvements:\nhttp://marc.info/?l=git&m=121691093706811&w=2\n\nHowever, we do have comments in the survey about how to improve git:\n * #1 documentation #2 interface:  a. having tons of git-* binaries in\n/usr/bin confuses tab-completion in the shell  b. the whole index\nconcept is a major pain point, i'm constantly trying to get around\nhaving to deal with it\n * 1) CLI interface 2) More consistent terminology 3) Better\ndocumentation with examples and use cases\n * a more intuitive command line interface\n * Better consistency of the interface. Documentation intended for\nusers, rather than being addressed to people who already understand\nwhat a reflog is.\n * Better docs, better official interface\n * better docs, better usage hints, more consistent terminology/interface\n * Better user interface (on command line). More safety against user errors.\n * bzr like plugin ability, consistent interface with all commands as\nwell as consistent naming of commands.\n * cleaner interface, of course the docs could be better in places.\nBetter responsiveness: my buddy submitted a patch to add a \"git svn\ndiff\" command and received no response from the mailing list, either\npositive or negative.\n * Cleaner, more consistent, easier to learn user interface.  Man\npages should be more user-oriented than developer-oriented.  Sparse\ncheckout can't come soon enough.\n * Cleanup the interface, not so many commands that do the same thing\nor almost the same thing.\n * CLI user interface.  git-svn corrupts history if svn repository was\ncreated according to instructions in the svn manual:\nhttps://bugs.launchpad.net/ubuntu/+source/git-core/+bug/163341\nWindows support is better than last year, but still causes problems\n(especially with ssh keys and line-endings). We can't move to git from\nsvn until the Windows users are happy too.\n...\n\nAnd the list goes on and on.\n\nOne of the lessons learned from the switch from 'git-foo' is that the\nchange should have been more visible to users, a big annoying 'this is\ndeprecated' warning would have been more than enough, because that\nwill force users to shout if they don't like it or accept the\nresolution once it's finally deprecated. Since can't possibly miss the\nwarning they would have no excuse to shout after the obsolescence.\n\nI understand the \"you can't change the status quo so easily kid\"\nargument, and I'm Ok with that. That's why I'm suggesting to deprecate\n--pretty; users would still be able to use it but will receive a\nwarning. If as you say users are happy with --pretty, then they'll\nshout when they realize someone is taking their precious option away,\nwe could wait until 1.8.0 to make it obsolete (remove it completely).\n\nIMHO these kinds of improvements *need to be done*, even if they are\npainful and take a lot of time. That doesn't mean 'git-foo' will be\nrepeated again; we can learn from the mistakes of the past.\n\nCheers.\n\n-- \nFelipe Contreras\n"}]}