{"thread":{"id":"32068","subject":"[PATCH] Documentation/log: fix description of format.pretty","startedAt":"2012-11-11T11:27:04Z","lastAt":"2012-11-12T17:42:51Z","messageCount":5,"participants":["Ramkumar Ramachandra","Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"202816","messageId":"CALkWK0=hdmYF2VoOZY4F7+yPD8D0rBnPY-tvp5pryRWp-0WBeg@mail.gmail.com","threadId":"32068","inReplyTo":null,"subject":"[PATCH] Documentation/log: fix description of format.pretty","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-11T11:27:04Z","receivedAt":"2012-11-11T11:27:04Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"59893a88 (Documentation/log: add a CONFIGURATION section, 2010-05-08)\nmentioned that `format.pretty` is the default for the `--format`\noption.  Such an option never existed, and the author meant\n`--pretty`.  Make this correction.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Documentation/git-log.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 585dac4..4b07ad4 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -148,7 +148,7 @@ See linkgit:git-config[1] for core variables and\nlinkgit:git-\n for settings related to diff generation.\n\n format.pretty::\n-       Default for the `--format` option.  (See \"PRETTY FORMATS\" above.)\n+       Default for the `--pretty` option.  (See \"PRETTY FORMATS\" above.)\n        Defaults to \"medium\".\n\n i18n.logOutputEncoding::\n-- \n1.7.12.1.428.g652398a.dirty\n"},{"id":"202945","messageId":"20121112080527.GB3581@elie.Belkin","threadId":"32068","inReplyTo":"CALkWK0=hdmYF2VoOZY4F7+yPD8D0rBnPY-tvp5pryRWp-0WBeg@mail.gmail.com","subject":"Re: [PATCH] Documentation/log: fix description of format.pretty","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-11-12T08:05:27Z","receivedAt":"2012-11-12T08:05:27Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Ram,\n\nRamkumar Ramachandra wrote:\n\n> 59893a88 (Documentation/log: add a CONFIGURATION section, 2010-05-08)\n> mentioned that `format.pretty` is the default for the `--format`\n> option.  Such an option never existed,\n\nFalse.  Have you tried it?\n\nThanks,\nJonathan\n"},{"id":"202948","messageId":"CALkWK0nR_9mWDKzKygR379x3L=d4bGKKo27AP-2Y=+coc7H+sQ@mail.gmail.com","threadId":"32068","inReplyTo":"20121112080527.GB3581@elie.Belkin","subject":"Re: [PATCH] Documentation/log: fix description of format.pretty","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-12T09:39:38Z","receivedAt":"2012-11-12T09:39:38Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jonathan,\n\nJonathan Nieder wrote:\n> Hi Ram,\n>\n> Ramkumar Ramachandra wrote:\n>\n>> 59893a88 (Documentation/log: add a CONFIGURATION section, 2010-05-08)\n>> mentioned that `format.pretty` is the default for the `--format`\n>> option.  Such an option never existed,\n>\n> False.  Have you tried it?\n\nOops, I read about `--pretty` in pretty-formats.txt and didn't realize\nthat `--format` existed.  However, your patch is still wrong because\nthere seems to be a subtle (and confusing) difference between\n`--pretty` and `--format`.  In the latter, you can't omit the format,\nand expect it to be picked up from format.pretty:\n\n  $ git log --format\n  fatal: unrecognized argument: --format\n\nInstead, you have to specify the format explicitly:\n\n  $ git log --format=medium\n\nSo, we should change the commit message in my patch?\n\nRam\n"},{"id":"202955","messageId":"20121112153855.GA3546@elie.Belkin","threadId":"32068","inReplyTo":"CALkWK0nR_9mWDKzKygR379x3L=d4bGKKo27AP-2Y=+coc7H+sQ@mail.gmail.com","subject":"Re: [PATCH] Documentation/log: fix description of format.pretty","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-11-12T15:38:55Z","receivedAt":"2012-11-12T15:38:55Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ramkumar Ramachandra wrote:\n\n> Oops, I read about `--pretty` in pretty-formats.txt and didn't realize\n> that `--format` existed.  However, your patch is still wrong because\n> there seems to be a subtle (and confusing) difference between\n> `--pretty` and `--format`.  In the latter, you can't omit the format,\n> and expect it to be picked up from format.pretty:\n>\n>   $ git log --format\n>   fatal: unrecognized argument: --format\n\nYou can do\n\n\t$ git log\n\nand format.pretty will still take effect.  In other words, setting\nformat.pretty to \"foo\" is somewhat like making\n\n\t$ git log\n\ndo\n\n\t$ git log --format=foo\n\nwhich is what the text is supposed to explain.  It is based on the\nfollowing text from Documentation/config.txt:\n\n\tformat.pretty::\n\t\tThe default pretty format for log/show/whatchanged command,\n\t\tSee linkgit:git-log[1], linkgit:git-show[1],\n\t\tlinkgit:git-whatchanged[1].\n\nI do imagine it can be made clearer.  s/--format/--pretty/ does not go\nfar enough --- it only replaces one confusing explanation with\nanother.\n\nHoping that clarifies,\nJonathan\n"},{"id":"202970","messageId":"7vwqxqk99g.fsf@alter.siamese.dyndns.org","threadId":"32068","inReplyTo":"20121112153855.GA3546@elie.Belkin","subject":"Re: [PATCH] Documentation/log: fix description of format.pretty","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-11-12T17:42:51Z","receivedAt":"2012-11-12T17:42:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Ramkumar Ramachandra wrote:\n>\n>> Oops, I read about `--pretty` in pretty-formats.txt and didn't realize\n>> that `--format` existed.  However, your patch is still wrong because\n>> there seems to be a subtle (and confusing) difference between\n>> `--pretty` and `--format`.  In the latter, you can't omit the format,\n>> and expect it to be picked up from format.pretty:\n>>\n>>   $ git log --format\n>>   fatal: unrecognized argument: --format\n\nWe probably should say \"--format needs an argument\" here.\n\n> ... It is based on the\n> following text from Documentation/config.txt:\n>\n> \tformat.pretty::\n> \t\tThe default pretty format for log/show/whatchanged command,\n> \t\tSee linkgit:git-log[1], linkgit:git-show[1],\n> \t\tlinkgit:git-whatchanged[1].\n>\n> I do imagine it can be made clearer.  s/--format/--pretty/ does not go\n> far enough --- it only replaces one confusing explanation with\n> another.\n\nThe --format and --pretty are more or less the same thing since\n3a4c1a5 (Add --format that is a synonym to --pretty, 2009-02-24).\nThe --format option was added as a synonym because majority of new\nusers who have never heard of --pretty found it more natural; in\nthat sense, Ram's patch goes backwards.\n\nThe entry in config.txt came from 94c22a5 (log/show/whatchanged:\nintroduce format.pretty configuration, 2008-03-02) that predates the\nsynonym, and originally it was to allow\n\n    [format] pretty = fuller\n\nto make \"git log\" by default use \"git log --pretty=fuller\" in the\nconfiguration; back then there wasn't a support for custom formats\nlike\n\n    [format] pretty = \"%h %s\"\n\nuntil 3640754 (Give short-hands to --pretty=tformat:%formatstring,\n2009-02-24) introduced it.\n\n\"The default pretty format\" in the description was written to refer\nto the original \"raw/medium/short/email/full/fuller\" set, but these\ndays, we accept anything that you can write after \"--pretty=\" (or\nits synonym \"--format=\") on the command line.\n\nThis is one of the reasons why I do not want to see abbreviated\ndescriptions for configuration variables duplicated in the manual\npages of individual commands, as the practice tends to lead to this\nkind of confusion.\n"}]}