From: Phillip Wood Date: Tue, 16 Oct 2018 13:38:59 GMT Subject: Re: What's cooking in git.git (Oct 2018, #01; Wed, 10) Message-ID: <9521f0a8-efa7-46d7-1aeb-aea700fc2fed@talktalk.net> In-Reply-To: On 12/10/2018 14:36, Junio C Hamano wrote: > Phillip Wood writes: > >> It would be nice if the parsing used starts_with(option_name, user_text) >> rather than strcmp() as well. Also I think --color-moved=no is valid as >> a synonym of --no-color-moved but --color-moved-ws=no is not supported. > > I am not sure about starts_with(). Do you mean we should accept > "--color-mo", as that is a prefix of "--color-moved" that is not > shared with any existing option, until we gain a different option > "--color-more"? I was thinking of the option arguments rather than the option names although being able to abbreviate the names in the same way as the commands that parse_options() would be good too (I seem to remember someone saying they had some rough patches to use parse_options() for diff and log in a discussion of adding completion support to parse_options()) > If you mean "--color-moved-ws=no" (or "--no-color-moved-ws") as a > way to countermand an earlier --color-moved-ws= on the > command line, I fully agree that it is a good idea. Oh I assumed --no-color-moved-ws was allowed but it isn't it. Allowing --color-moved-ws=no as well would match what is allowed for --color-moved. I'll try and look at that. Best Wishes Phillip