{"thread":{"id":"6661","subject":"[PATCH 2/8] bash: Classify cat-file and reflog as plumbing.","startedAt":"2007-02-04T07:38:21Z","lastAt":"2007-02-04T07:38:21Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"33537","messageId":"20070204073821.GB17603@spearce.org","threadId":"6661","inReplyTo":null,"subject":"[PATCH 2/8] bash: Classify cat-file and reflog as plumbing.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-04T07:38:21Z","receivedAt":"2007-02-04T07:38:21Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Now that git-show is capable of displaying any file content from any\nrevision and is the approved Porcelain-ish level method of doing so,\ncat-file should no longer be classified as a user-level utility by\nthe bash completion package.\n\nI'm also classifying the new git-reflog command as plumbing for the\ntime being as there are no subcommands which are really useful to\nthe end-user.  git-gc already invokes `git reflog expire --all`,\nwhich makes it rather unnecessary for the user to invoke it directly.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n contrib/completion/git-completion.bash |   23 +++--------------------\n 1 files changed, 3 insertions(+), 20 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 971fefb..b87f96d 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1,7 +1,7 @@\n #\n # bash completion support for core Git.\n #\n-# Copyright (C) 2006 Shawn Pearce\n+# Copyright (C) 2006,2007 Shawn Pearce\n # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).\n #\n # The contained completion routines provide support for completing:\n@@ -235,6 +235,7 @@ __git_commands ()\n \tfor i in $(git help -a|egrep '^ ')\n \tdo\n \t\tcase $i in\n+\t\tcat-file)         : plumbing;;\n \t\tcheck-ref-format) : plumbing;;\n \t\tcommit-tree)      : plumbing;;\n \t\tconvert-objects)  : plumbing;;\n@@ -258,6 +259,7 @@ __git_commands ()\n \t\tpeek-remote)      : plumbing;;\n \t\tread-tree)        : plumbing;;\n \t\treceive-pack)     : plumbing;;\n+\t\treflog)           : plumbing;;\n \t\trerere)           : plumbing;;\n \t\trev-list)         : plumbing;;\n \t\trev-parse)        : plumbing;;\n@@ -362,22 +364,6 @@ _git_branch ()\n \tCOMPREPLY=($(compgen -W \"$(__git_refs)\" -- \"$cur\"))\n }\n \n-_git_cat_file ()\n-{\n-\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n-\tcase \"${COMP_WORDS[0]},$COMP_CWORD\" in\n-\tgit-cat-file*,1)\n-\t\tCOMPREPLY=($(compgen -W \"-p -t blob tree commit tag\" -- \"$cur\"))\n-\t\t;;\n-\tgit,2)\n-\t\tCOMPREPLY=($(compgen -W \"-p -t blob tree commit tag\" -- \"$cur\"))\n-\t\t;;\n-\t*)\n-\t\t__git_complete_file\n-\t\t;;\n-\tesac\n-}\n-\n _git_checkout ()\n {\n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n@@ -802,7 +788,6 @@ _git ()\n \tam)          _git_am ;;\n \tapply)       _git_apply ;;\n \tbranch)      _git_branch ;;\n-\tcat-file)    _git_cat_file ;;\n \tcheckout)    _git_checkout ;;\n \tcherry-pick) _git_cherry_pick ;;\n \tcommit)      _git_commit ;;\n@@ -840,7 +825,6 @@ complete -o default            -F _gitk gitk\n complete -o default            -F _git_am git-am\n complete -o default            -F _git_apply git-apply\n complete -o default            -F _git_branch git-branch\n-complete -o default -o nospace -F _git_cat_file git-cat-file\n complete -o default            -F _git_checkout git-checkout\n complete -o default            -F _git_cherry_pick git-cherry-pick\n complete -o default            -F _git_commit git-commit\n@@ -871,7 +855,6 @@ if [ Cygwin = \"$(uname -o 2>/dev/null)\" ]; then\n complete -o default            -F _git_apply git-apply.exe\n complete -o default -o nospace -F _git git.exe\n complete -o default            -F _git_branch git-branch.exe\n-complete -o default -o nospace -F _git_cat_file git-cat-file.exe\n complete -o default -o nospace -F _git_diff git-diff.exe\n complete -o default -o nospace -F _git_diff_tree git-diff-tree.exe\n complete -o default -o nospace -F _git_format_patch git-format-patch.exe\n-- \n1.5.0.rc3.22.g5057\n"}]}