summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-12-12 11:21:46 +0100
committerJunio C Hamano <gitster@pobox.com>2009-12-12 15:32:07 -0800
commite25e2b4201716a912b29397515a858238497dbdd (patch)
treed04bd27577c4bf03d6336403ccd4fd7b6ef3a93c /contrib
parent4966688e55d543fe93f9ba270c0f8b71a2c2a53e (diff)
downloadgit-e25e2b4201716a912b29397515a858238497dbdd.tar.gz
bash: Support new 'git fetch' options
Support the new options --all, --prune, and --dry-run for 'git fetch'. As the --multiple option was primarily introduced to enable 'git remote update' to be re-implemented in terms of 'git fetch' (16679e37) and is not likely to be used much from the command line, it does not seems worthwhile to complicate the code (to support completion of multiple remotes) to handle it. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash14
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7c18b0c07e..fbfa5f25c1 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -417,7 +417,17 @@ __git_complete_remote_or_refspec ()
while [ $c -lt $COMP_CWORD ]; do
i="${COMP_WORDS[c]}"
case "$i" in
- --all|--mirror) [ "$cmd" = "push" ] && no_complete_refspec=1 ;;
+ --mirror) [ "$cmd" = "push" ] && no_complete_refspec=1 ;;
+ --all)
+ case "$cmd" in
+ push) no_complete_refspec=1 ;;
+ fetch)
+ COMPREPLY=()
+ return
+ ;;
+ *) ;;
+ esac
+ ;;
-*) ;;
*) remote="$i"; break ;;
esac
@@ -1002,7 +1012,7 @@ _git_difftool ()
__git_fetch_options="
--quiet --verbose --append --upload-pack --force --keep --depth=
- --tags --no-tags
+ --tags --no-tags --all --prune --dry-run
"
_git_fetch ()