{"thread":{"id":"45833","subject":"Bug: wrong documentation for git-fast-import's option command","startedAt":"2017-04-30T00:08:25Z","lastAt":"2017-05-01T13:27:12Z","messageCount":3,"participants":["Tomi Belan","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"318250","messageId":"CACUV5oeKoVdncK3RjtusiqrACj1xLiS--z8vC+Rsvy5TF09Lsw@mail.gmail.com","threadId":"45833","inReplyTo":null,"subject":"Bug: wrong documentation for git-fast-import's option command","fromName":"Tomi Belan","fromEmail":"tomi.belan@gmail.com","sentAt":"2017-04-30T00:07:47Z","receivedAt":"2017-04-30T00:08:25Z","isPatch":false,"sender":{"key":"tomi.belan@gmail.com","avatar":null},"body":"The man page of git-fast-import says the syntax is \"'option' SP\n<option> LF\". But this is wrong, and commands like that will be\nsilently ignored.\n\nfast-import.c only parses commands starting with \"option git \", and\nignores others starting with \"option \". See\nhttps://github.com/git/git/blob/027a3b943b444a3e3a76f9a89803fc10245b858f/fast-import.c#L3487-L3490\n.\n\nThe correct syntax is e.g. \"option git stats\" or \"option git\nbig-file-threshold=123\". The docs should say \"'option' SP 'git' SP\n<option> LF\" or maybe even \"'option' SP 'git' SP <option> ('='\n<argument>)? LF\" (similarly to the docs for feature), and explain this\nis meant to allow other consumers of the fast import format.\n\nLooks like this bug existed since the option command was added in\n9c8398f in 2009. Am I the first one who tried to use it? ;-)\n\nCheers,\n\nTomi\n"},{"id":"318255","messageId":"874lx68abt.fsf@linux-m68k.org","threadId":"45833","inReplyTo":"CACUV5oeKoVdncK3RjtusiqrACj1xLiS--z8vC+Rsvy5TF09Lsw@mail.gmail.com","subject":"Re: Bug: wrong documentation for git-fast-import's option command","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2017-04-30T10:21:42Z","receivedAt":"2017-04-30T10:21:51Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Apr 30 2017, Tomi Belan <tomi.belan@gmail.com> wrote:\n\n> The man page of git-fast-import says the syntax is \"'option' SP\n> <option> LF\". But this is wrong, and commands like that will be\n> silently ignored.\n\nUnless <option> starts with 'git', as you have seen.  Other importers\nmay recognize other options, eg 'option hg ...'.\n\n> The correct syntax is e.g. \"option git stats\" or \"option git\n> big-file-threshold=123\". The docs should say \"'option' SP 'git' SP\n> <option> LF\" or maybe even \"'option' SP 'git' SP <option> ('='\n> <argument>)? LF\" (similarly to the docs for feature), and explain this\n> is meant to allow other consumers of the fast import format.\n>\n> Looks like this bug existed since the option command was added in\n> 9c8398f in 2009. Am I the first one who tried to use it? ;-)\n>\n> Cheers,\n>\n> Tomi\n>\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"318368","messageId":"CACUV5ocdADaXYpcQG6kJ0CaR+d+EwyaSFFReaO2ni+1CnJMvyw@mail.gmail.com","threadId":"45833","inReplyTo":"874lx68abt.fsf@linux-m68k.org","subject":"Re: Bug: wrong documentation for git-fast-import's option command","fromName":"Tomi Belan","fromEmail":"tomi.belan@gmail.com","sentAt":"2017-05-01T13:26:30Z","receivedAt":"2017-05-01T13:27:12Z","isPatch":false,"sender":{"key":"tomi.belan@gmail.com","avatar":null},"body":"On Sun, Apr 30, 2017 at 12:21 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> Unless <option> starts with 'git', as you have seen.  Other importers\n> may recognize other options, eg 'option hg ...'.\n\nHmm? Are you disagreeing with how I described the issue, or saying\nthere is no issue at all? I'm not sure.\n\nI know the syntax is meant for other importers, which might accept\ndifferent options. My point is that the man page doesn't say anything\nabout that. If a frontend follows the man page and just prints e.g.\n\"option quiet\", git-fast-import will silently ignore it.\n\nIf you dislike my suggested fix \"'option' SP 'git' SP ...\", then how about\n'option' SP <program> SP <option> ('=' <argument>)? LF\nand saying that for options supported by Git, <program> must be 'git'?\n\nCheers,\n\nTomi\n"}]}