From: Jonathan Nieder Date: Mon, 29 Nov 2010 16:40:49 GMT Subject: Re: [PATCH v3] help: always suggest common-cmds if prefix of cmd Message-ID: <20101129164049.GH8037@burratino> In-Reply-To: Erik Faye-Lund wrote: > For this code-path to trigger we would have to be able to prefix-match > every common command AND every "main command" must be included in > common commands. At the same time. The only possible way to > prefix-match all commands is if they all start with the same letter. > Do you really think this is a situation we could ever end up in? Every > git command being a common-command, starting with the same letter? > > This is basically unreachable code. Perhaps it'd be even clearer just to die: > > if (main_cmds.cnt <= n) > die("Prefix-matched everyting, what's going on?"); (I haven't checked.) Maybe $ git "" ?