bash: Classify cat-file and reflog as plumbing.
Now that git-show is capable of displaying any file content from any revision and is the approved Porcelain-ish level method of doing so, cat-file should no longer be classified as a user-level utility by the bash completion package. I'm also classifying the new git-reflog command as plumbing for the time being as there are no subcommands which are really useful to the end-user. git-gc already invokes `git reflog expire --all`, which makes it rather unnecessary for the user to invoke it directly. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Feb 4, 2007 at 02:38 UTC
2e3a430a9a976ec9324b33fef41dfeb55353a1ae
1 file changed
+3
-20
contrib/completion/git-completion.bash
+3
-20
@@ -1,7 +1,7 @@
1
#
2
# bash completion support for core Git.
3
#
4
-# Copyright (C) 2006 Shawn Pearce
4
+# Copyright (C) 2006,2007 Shawn Pearce
5
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
6
#
7
# The contained completion routines provide support for completing:
@@ -235,6 +235,7 @@ __git_commands ()
235
for i in $(git help -a|egrep '^ ')
236
do
237
case $i in
238
+ cat-file) : plumbing;;
239
check-ref-format) : plumbing;;
240
commit-tree) : plumbing;;
241
convert-objects) : plumbing;;
@@ -258,6 +259,7 @@ __git_commands ()
259
peek-remote) : plumbing;;
260
read-tree) : plumbing;;
261
receive-pack) : plumbing;;
262
+ reflog) : plumbing;;
263
rerere) : plumbing;;
264
rev-list) : plumbing;;
265
rev-parse) : plumbing;;
@@ -362,22 +364,6 @@ _git_branch ()
364
COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
365
}
366
365
-_git_cat_file ()
366
-{
367
- local cur="${COMP_WORDS[COMP_CWORD]}"
368
- case "${COMP_WORDS[0]},$COMP_CWORD" in
369
- git-cat-file*,1)
370
- COMPREPLY=($(compgen -W "-p -t blob tree commit tag" -- "$cur"))
371
- ;;
372
- git,2)
373
- COMPREPLY=($(compgen -W "-p -t blob tree commit tag" -- "$cur"))
374
- ;;
375
- *)
376
- __git_complete_file
377
- ;;
378
- esac
379
-}
380
-
367
_git_checkout ()
368
{
369
local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -802,7 +788,6 @@ _git ()
788
am) _git_am ;;
789
apply) _git_apply ;;
790
branch) _git_branch ;;
805
- cat-file) _git_cat_file ;;
791
checkout) _git_checkout ;;
792
cherry-pick) _git_cherry_pick ;;
793
commit) _git_commit ;;
@@ -840,7 +825,6 @@ complete -o default -F _gitk gitk
825
complete -o default -F _git_am git-am
826
complete -o default -F _git_apply git-apply
827
complete -o default -F _git_branch git-branch
843
-complete -o default -o nospace -F _git_cat_file git-cat-file
828
complete -o default -F _git_checkout git-checkout
829
complete -o default -F _git_cherry_pick git-cherry-pick
830
complete -o default -F _git_commit git-commit
@@ -871,7 +855,6 @@ if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
855
complete -o default -F _git_apply git-apply.exe
856
complete -o default -o nospace -F _git git.exe
857
complete -o default -F _git_branch git-branch.exe
874
-complete -o default -o nospace -F _git_cat_file git-cat-file.exe
858
complete -o default -o nospace -F _git_diff git-diff.exe
859
complete -o default -o nospace -F _git_diff_tree git-diff-tree.exe
860
complete -o default -o nospace -F _git_format_patch git-format-patch.exe