{"thread":{"id":"49935","subject":"Confusing inconsistent option syntax","startedAt":"2018-12-02T10:07:56Z","lastAt":"2018-12-03T22:14:45Z","messageCount":3,"participants":["Robert White","Duy Nguyen","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"364435","messageId":"20181202100747.GA5019@laptop","threadId":"49935","inReplyTo":null,"subject":"Confusing inconsistent option syntax","fromName":"Robert White","fromEmail":"rjwhite2453@gmail.com","sentAt":"2018-12-02T10:07:47Z","receivedAt":"2018-12-02T10:07:56Z","isPatch":false,"sender":{"key":"rjwhite2453@gmail.com","avatar":null},"body":"`git log --pretty short` gives the error message \"ambiguous argument\n'short'\". To get the expected result, you need to use `git log\n--pretty=short`. However, `git log --since yesterday` and `git log\n--since=yesterday` both work as expected.\n\nWhen is an = needed? What is the reason for these inconsistencies?\n\n---\nRobert White\n"},{"id":"364436","messageId":"CACsJy8Ct3YY1TPD=pFoBGX-0woMNvM0JHYC1iRDGxWLJR51Esg@mail.gmail.com","threadId":"49935","inReplyTo":"20181202100747.GA5019@laptop","subject":"Re: Confusing inconsistent option syntax","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-02T10:18:49Z","receivedAt":"2018-12-02T10:19:20Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Dec 2, 2018 at 11:13 AM Robert White <rjwhite2453@gmail.com> wrote:\n>\n> `git log --pretty short` gives the error message \"ambiguous argument\n> 'short'\". To get the expected result, you need to use `git log\n> --pretty=short`. However, `git log --since yesterday` and `git log\n> --since=yesterday` both work as expected.\n>\n> When is an = needed? What is the reason for these inconsistencies?\n\n--pretty can take no arguments. --pretty alone is the same as\n--pretty=medium. --since always needs an argument.\n-- \nDuy\n"},{"id":"364495","messageId":"20181203221441.GB11883@sigill.intra.peff.net","threadId":"49935","inReplyTo":"20181202100747.GA5019@laptop","subject":"Re: Confusing inconsistent option syntax","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-12-03T22:14:41Z","receivedAt":"2018-12-03T22:14:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 02, 2018 at 09:07:47PM +1100, Robert White wrote:\n\n> `git log --pretty short` gives the error message \"ambiguous argument\n> 'short'\". To get the expected result, you need to use `git log\n> --pretty=short`. However, `git log --since yesterday` and `git log\n> --since=yesterday` both work as expected.\n> \n> When is an = needed? What is the reason for these inconsistencies?\n\nAs Duy mentioned, this has to do with optional arguments for some flags.\nThis is discussed in more detail in \"git help cli\". Notably (and as\nadvised in that manpage), you should always use the \"stuck\" form (with\nthe \"=\") in scripts, in case a flag grows an optional value later.\n\n-Peff\n"}]}