summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-14 11:50:57 -0700
committerJunio C Hamano <gitster@pobox.com>2012-05-14 11:50:57 -0700
commitfca9249b86411718a66835fe5107219b49c1767f (patch)
treecc0263681bf86258644e88b9b51e35f35f0121fb
parentcc13431a49800a6a1d2b7ff0b94f67da0fecdbab (diff)
parent41e6229db4abaf08ca277115f9ac800cdc7591d6 (diff)
downloadgit-fca9249b86411718a66835fe5107219b49c1767f.tar.gz
Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras * fc/simplify-complete-revlist-file: completion: simplify __git_complete_revlist_file
-rwxr-xr-xcontrib/completion/git-completion.bash6
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9f56ec7a6b..2f60825b21 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -676,9 +676,7 @@ __git_complete_revlist_file ()
*) pfx="$ref:$pfx" ;;
esac
- local IFS=$'\n'
- COMPREPLY=($(compgen -P "$pfx" \
- -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
+ __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
| sed '/^100... blob /{
s,^.* ,,
s,$, ,
@@ -692,7 +690,7 @@ __git_complete_revlist_file ()
s,$,/,
}
s/^.* //')" \
- -- "$cur_"))
+ "$pfx" "$cur_" ""
;;
*...*)
pfx="${cur_%...*}..."