From: Junio C Hamano Date: Tue, 25 Sep 2012 23:25:52 GMT Subject: Re: [PATCH v2 14/14] Add git-check-ignore sub-command Message-ID: <7vk3vhvg5b.fsf@alter.siamese.dyndns.org> In-Reply-To: <505BFED7.5030203@viscovery.net> Johannes Sixt writes: > Am 9/20/2012 21:46, schrieb Adam Spiers: >> test_expect_success 'general options plus command' ' >> - test_completion "git --version check" "checkout " && >> - test_completion "git --paginate check" "checkout " && >> - test_completion "git --git-dir=foo check" "checkout " && >> - test_completion "git --bare check" "checkout " && >> + test_completion "git --version checko" "checkout " && >> + test_completion "git --paginate checko" "checkout " && >> + test_completion "git --git-dir=foo checko" "checkout " && >> + test_completion "git --bare checko" "checkout " && >> ... > > I find this worrysome. Is check-ignore, being a debugging aid, so > important that it must be autocompleted? The shell function __git_list_porcelain_commands in contrib/completion/ starts from "git help -a" and filters plumbing commands and helpers via a blacklist. At least, check-ignore needs to be added there. These days, we do not add random subcommands willy-nilly (I still doubt if check-ignore needs to be a separate debugging command, or a new mode of operation of ls-files or something), so the approach to use a blacklist makes more sense. "help -a" is designed to show whatever the users throw in their ~/bin (assuming that is on $PATH) under git-whatever name, and we _do_ want to complete "git wh" to that custom command, so a whitelist-based solution is unwieldy to construct.