зеркало из https://github.com/microsoft/git.git
bash: remove dashed command leftovers
Commit 5a625b07
(bash: remove fetch, push, pull dashed form leftovers,
2008-10-03) did that already, but there were still some git-cmd left
here and there.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
b21a226a42
Коммит
8d8163f377
|
@ -650,21 +650,12 @@ _git_branch ()
|
||||||
|
|
||||||
_git_bundle ()
|
_git_bundle ()
|
||||||
{
|
{
|
||||||
local mycword="$COMP_CWORD"
|
local cmd="${COMP_WORDS[2]}"
|
||||||
case "${COMP_WORDS[0]}" in
|
case "$COMP_CWORD" in
|
||||||
git)
|
2)
|
||||||
local cmd="${COMP_WORDS[2]}"
|
|
||||||
mycword="$((mycword-1))"
|
|
||||||
;;
|
|
||||||
git-bundle*)
|
|
||||||
local cmd="${COMP_WORDS[1]}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "$mycword" in
|
|
||||||
1)
|
|
||||||
__gitcomp "create list-heads verify unbundle"
|
__gitcomp "create list-heads verify unbundle"
|
||||||
;;
|
;;
|
||||||
2)
|
3)
|
||||||
# looking for a file
|
# looking for a file
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -812,12 +803,7 @@ _git_fetch ()
|
||||||
__gitcomp "$(__git_refs)" "$pfx" "${cur#*:}"
|
__gitcomp "$(__git_refs)" "$pfx" "${cur#*:}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local remote
|
__gitcomp "$(__git_refs2 "${COMP_WORDS[2]}")"
|
||||||
case "${COMP_WORDS[0]}" in
|
|
||||||
git-fetch) remote="${COMP_WORDS[1]}" ;;
|
|
||||||
git) remote="${COMP_WORDS[2]}" ;;
|
|
||||||
esac
|
|
||||||
__gitcomp "$(__git_refs2 "$remote")"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -1060,12 +1046,7 @@ _git_pull ()
|
||||||
if [ "$COMP_CWORD" = 2 ]; then
|
if [ "$COMP_CWORD" = 2 ]; then
|
||||||
__gitcomp "$(__git_remotes)"
|
__gitcomp "$(__git_remotes)"
|
||||||
else
|
else
|
||||||
local remote
|
__gitcomp "$(__git_refs "${COMP_WORDS[2]}")"
|
||||||
case "${COMP_WORDS[0]}" in
|
|
||||||
git-pull) remote="${COMP_WORDS[1]}" ;;
|
|
||||||
git) remote="${COMP_WORDS[2]}" ;;
|
|
||||||
esac
|
|
||||||
__gitcomp "$(__git_refs "$remote")"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1078,19 +1059,13 @@ _git_push ()
|
||||||
else
|
else
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
*:*)
|
*:*)
|
||||||
local remote
|
|
||||||
case "${COMP_WORDS[0]}" in
|
|
||||||
git-push) remote="${COMP_WORDS[1]}" ;;
|
|
||||||
git) remote="${COMP_WORDS[2]}" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local pfx=""
|
local pfx=""
|
||||||
case "$COMP_WORDBREAKS" in
|
case "$COMP_WORDBREAKS" in
|
||||||
*:*) : great ;;
|
*:*) : great ;;
|
||||||
*) pfx="${cur%%:*}:" ;;
|
*) pfx="${cur%%:*}:" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
__gitcomp "$(__git_refs "$remote")" "$pfx" "${cur#*:}"
|
__gitcomp "$(__git_refs "${COMP_WORDS[2]}")" "$pfx" "${cur#*:}"
|
||||||
;;
|
;;
|
||||||
+*)
|
+*)
|
||||||
__gitcomp "$(__git_refs)" + "${cur#+}"
|
__gitcomp "$(__git_refs)" + "${cur#+}"
|
||||||
|
@ -1591,7 +1566,7 @@ _git_tag ()
|
||||||
-m|-F)
|
-m|-F)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
-*|tag|git-tag)
|
-*|tag)
|
||||||
if [ $f = 1 ]; then
|
if [ $f = 1 ]; then
|
||||||
__gitcomp "$(__git_tags)"
|
__gitcomp "$(__git_tags)"
|
||||||
else
|
else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче