{"thread":{"id":"14642","subject":"[PATCH] git-completion.bash: provide completion for 'show-branch'","startedAt":"2008-07-23T21:36:15Z","lastAt":"2008-07-23T21:36:15Z","messageCount":1,"participants":["Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"84609","messageId":"1216848975-30447-1-git-send-email-trast@student.ethz.ch","threadId":"14642","inReplyTo":null,"subject":"[PATCH] git-completion.bash: provide completion for 'show-branch'","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-07-23T21:36:15Z","receivedAt":"2008-07-23T21:36:15Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"It previously used the same as 'log', but the options are quite\ndifferent and the arguments must be single refs (or globs).\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n contrib/completion/git-completion.bash |   18 +++++++++++++++++-\n 1 files changed, 17 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 5d260e2..4cfe927 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1210,6 +1210,22 @@ _git_show ()\n \t__git_complete_file\n }\n \n+_git_show_branch ()\n+{\n+\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n+\tcase \"$cur\" in\n+\t--*)\n+\t\t__gitcomp \"\n+\t\t\t--all --remotes --topo-order --current --more=\n+\t\t\t--list --independent --merge-base --no-name\n+\t\t\t--sha1-name --topics --reflog\n+\t\t\t\"\n+\t\treturn\n+\t\t;;\n+\tesac\n+\t__git_complete_revlist\n+}\n+\n _git_stash ()\n {\n \tlocal subcommands='save list show apply clear drop pop create'\n@@ -1428,7 +1444,7 @@ _git ()\n \tsend-email)  _git_send_email ;;\n \tshortlog)    _git_shortlog ;;\n \tshow)        _git_show ;;\n-\tshow-branch) _git_log ;;\n+\tshow-branch) _git_show_branch ;;\n \tstash)       _git_stash ;;\n \tsubmodule)   _git_submodule ;;\n \tsvn)         _git_svn ;;\n-- \n1.6.0.rc0.16.g0680f\n"}]}