git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Erik Faye-Lund <kusmabite@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, ziade.tarek@gmail.com
Subject: Re: [PATCH v3] help: always suggest common-cmds if prefix of cmd
Date: Mon, 29 Nov 2010 10:40:49 -0600	[thread overview]
Message-ID: <20101129164049.GH8037@burratino> (raw)
In-Reply-To: <AANLkTin34AfYnFY5e9B1cuyckfLXU2=qXFciFaaNGt9f@mail.gmail.com>

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 ""

?

  reply	other threads:[~2010-11-29 16:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 12:23 bug: unexpected output for "git st" + suggestion Tarek Ziadé
2010-11-23 12:40 ` Nguyen Thai Ngoc Duy
2010-11-23 12:49   ` Tarek Ziadé
2010-11-23 13:08     ` Nguyen Thai Ngoc Duy
2010-11-23 13:18       ` Tarek Ziadé
2010-11-23 13:26         ` Nguyen Thai Ngoc Duy
2010-11-23 20:38         ` Andreas Schwab
2010-11-23 12:43 ` Sylvain Rabot
2010-11-23 13:22 ` Erik Faye-Lund
2010-11-23 13:47   ` Tarek Ziadé
2010-11-23 13:56     ` Erik Faye-Lund
2010-11-23 13:58       ` Tarek Ziadé
2010-11-23 19:11         ` [PATCH] help: always suggest common-cmds if prefix of cmd Erik Faye-Lund
2010-11-24 19:49           ` Junio C Hamano
2010-11-24 20:20             ` Erik Faye-Lund
2010-11-24 23:53               ` Erik Faye-Lund
2010-11-25  4:49               ` Junio C Hamano
2010-11-25 10:39                 ` Erik Faye-Lund
2010-11-26 16:00                   ` [PATCH v3] " Erik Faye-Lund
2010-11-27  0:18                     ` Junio C Hamano
2010-11-29 11:20                       ` Erik Faye-Lund
2010-11-29 16:40                         ` Jonathan Nieder [this message]
2010-11-29 16:53                           ` Erik Faye-Lund
2010-11-29 17:44                         ` Junio C Hamano
2010-12-01 14:33                           ` Erik Faye-Lund
2018-11-19 20:35                     ` help.autoCorrect prefix selection considered a bit dangerous Ævar Arnfjörð Bjarmason
2018-11-20  3:23                       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101129164049.GH8037@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kusmabite@gmail.com \
    --cc=ziade.tarek@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).