{"thread":{"id":"41941","subject":"log --pretty accepts incomplete pre-defined formats","startedAt":"2016-04-06T06:13:57Z","lastAt":"2016-04-06T21:07:01Z","messageCount":4,"participants":["Sidhant Sharma","Junio C Hamano","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"282746","messageId":"5704A925.9030506@gmail.com","threadId":"41941","inReplyTo":null,"subject":"log --pretty accepts incomplete pre-defined formats","fromName":"Sidhant Sharma","fromEmail":"tigerkid001@gmail.com","sentAt":"2016-04-06T06:13:57Z","receivedAt":"2016-04-06T06:13:57Z","isPatch":false,"sender":{"key":"tigerkid001@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7801881?v=4"},"body":"Hi,\n\nRecently while playing around with git log, I realized that it is possible to\npass incomplete (pre-defined) format names. For example, it is possible to use\n`git log --pretty=one` instead of oneline and it would still output the logs in\noneline formatting. Same goes for other formats such as 'raw', 'short' and others.\nI looked at the code and it seems that it is intentionally kept so. It this so?\nI'm curious to know the reason behind keeping this so.\n\n\nThanks and regards,\nSidhant Sharma\n"},{"id":"282766","messageId":"xmqqinzuzs3d.fsf@gitster.mtv.corp.google.com","threadId":"41941","inReplyTo":"5704A925.9030506@gmail.com","subject":"Re: log --pretty accepts incomplete pre-defined formats","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-06T15:15:18Z","receivedAt":"2016-04-06T15:15:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sidhant Sharma <tigerkid001@gmail.com> writes:\n\n> Recently while playing around with git log, I realized that it is possible to\n> pass incomplete (pre-defined) format names. For example, it is possible to use\n> `git log --pretty=one` instead of oneline and it would still output the logs in\n> oneline formatting. Same goes for other formats such as 'raw', 'short' and others.\n> I looked at the code and it seems that it is intentionally kept so. It this so?\n> I'm curious to know the reason behind keeping this so.\n\nI actually am curious why somebody wants to know, as more modern\nparts of the system allow option names abbreviated to unique\nprefixes.  \"Why can't I say 'log --pret=oneline' when I can say\n'commit --ame'?\" might be a more plausible puzzlement (and the\nanswer is \"hysterical raisins\").  Anyway, this seems to come from\n6cdfd179 (commit: allow --pretty= args to be abbreviated,\n2006-05-14), which was slightly tightend by aacd404e (Fix some\ndocumentation typos and grammar, 2007-02-02).\n"},{"id":"282791","messageId":"20160406210339.GA18799@dcvr.yhbt.net","threadId":"41941","inReplyTo":"xmqqinzuzs3d.fsf@gitster.mtv.corp.google.com","subject":"Re: log --pretty accepts incomplete pre-defined formats","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2016-04-06T21:03:39Z","receivedAt":"2016-04-06T21:03:39Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Sidhant Sharma <tigerkid001@gmail.com> writes:\n> \n> > Recently while playing around with git log, I realized that it is possible to\n> > pass incomplete (pre-defined) format names. For example, it is possible to use\n> > `git log --pretty=one` instead of oneline and it would still output the logs in\n> > oneline formatting. Same goes for other formats such as 'raw', 'short' and others.\n> > I looked at the code and it seems that it is intentionally kept so. It this so?\n> > I'm curious to know the reason behind keeping this so.\n> \n> I actually am curious why somebody wants to know, as more modern\n> parts of the system allow option names abbreviated to unique\n> prefixes.  \"Why can't I say 'log --pret=oneline' when I can say\n> 'commit --ame'?\" might be a more plausible puzzlement (and the\n> answer is \"hysterical raisins\").  Anyway, this seems to come from\n> 6cdfd179 (commit: allow --pretty= args to be abbreviated,\n> 2006-05-14),\n\nYes, being able to abbreviate 'raw', 'short', etc is intentional\nto save keystrokes since I was suffering from RSI at the time.\n\nBeing able to do \"--pret=r\" would be nice nowadays if the\nparsing in revision.c were modernized.  However, the completions\nin contrib/ also expands \"--pretty=\" nowadays, so now I care\nless about shorthand options.\n\n> which was slightly tightend by aacd404e (Fix some\n> documentation typos and grammar, 2007-02-02).\n\nHuh?\n"},{"id":"282792","messageId":"CAPc5daVQwP2ZxpK6+57q+_EZLTU=CuHmcVT_VHmFH-KxrSKMog@mail.gmail.com","threadId":"41941","inReplyTo":"20160406210339.GA18799@dcvr.yhbt.net","subject":"Re: log --pretty accepts incomplete pre-defined formats","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-06T21:07:01Z","receivedAt":"2016-04-06T21:07:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Wed, Apr 6, 2016 at 2:03 PM, Eric Wong <normalperson@yhbt.net> wrote:\n>> which was slightly tightend by aacd404e (Fix some\n>> documentation typos and grammar, 2007-02-02).\n>\n> Huh?\n\nHuh indeed.\n\nb6936205 (Disallow invalid --pretty= abbreviations, 2007-02-02)\n\nwas what I meant to name.\n"}]}