Subject: Re: [PATCH] bash completion: Hide more plumbing commands

From: Jakub Narebski <[email-masked]>
Date: Tue, 26 Aug 2008 10:38:45 -0700 (PDT)

Petr Baudis <[email-masked]> writes:

> git <tab><tab> still shows way too many commands, some of them
> are clearly plumbing. This patch hides the plumbing commands
> liberally (that is, in special cases, users still might want to
> call one of the hidden commands, a *normal* workflow should never
> involve these, though - and if it does, we have a UI problem anyway).
> 
> Signed-off-by: Petr Baudis <[email-masked]>
> ---
> 
>  contrib/completion/git-completion.bash |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 89858c2..773d64b 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -386,7 +386,9 @@ __git_porcelain_commands ()
>  		cat-file)         : plumbing;;
>  		check-attr)       : plumbing;;
>  		check-ref-format) : plumbing;;
> +		checkout-index)   : plumbing;;

Clearly plumbing.

>  		commit-tree)      : plumbing;;
> +		count-objects)    : plumbing;;

Plumbing (hyphenated name is a very good hint), but useful to decide
when to repack. I'm partially to leaving it, as I use it from time to
time from CLI.

>  		cvsexportcommit)  : export;;
>  		cvsimport)        : import;;
>  		cvsserver)        : daemon;;
> @@ -395,6 +397,7 @@ __git_porcelain_commands ()
>  		diff-index)       : plumbing;;
>  		diff-tree)        : plumbing;;
>  		fast-import)      : import;;
> +		fast-export)      : export;;

Good catch. BTW. both fast-import and fast-export are plumbing, in a
sense that I don't see how they can be used from command line
(well...)

>  		fsck-objects)     : plumbing;;
>  		fetch-pack)       : plumbing;;
>  		fmt-merge-msg)    : plumbing;;
> @@ -404,6 +407,10 @@ __git_porcelain_commands ()
>  		index-pack)       : plumbing;;
>  		init-db)          : deprecated;;
>  		local-fetch)      : plumbing;;
> +		lost-found)       : deprecated;;

True.

> +		ls-files)         : plumbing;;

IIRC it doesn't have porcelain equivalent.

> +		ls-remote)        : plumbing;;

"git remote show" is porcelain equivalent.

> +		ls-tree)          : plumbing;;

"git show" can be used instead.

>  		mailinfo)         : plumbing;;
>  		mailsplit)        : plumbing;;
>  		merge-*)          : plumbing;;
> @@ -428,6 +435,7 @@ __git_porcelain_commands ()
>  		runstatus)        : plumbing;;
>  		sh-setup)         : internal;;
>  		shell)            : daemon;;
> +		show-ref)         : plumbing;;

Clearly plumbing.

>  		send-pack)        : plumbing;;
>  		show-index)       : plumbing;;
>  		ssh-*)            : transport;;

-- 
Jakub Narebski
Poland
ShadeHawk on #git