summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-14 11:50:57 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-14 11:50:57 -0700
commitfca9249b86411718a66835fe5107219b49c1767f (patch)
treecc0263681bf86258644e88b9b51e35f35f0121fb /contrib/completion
parentMerge branch 'nd/threaded-index-pack' (diff)
parentcompletion: simplify __git_complete_revlist_file (diff)
downloadtgif-fca9249b86411718a66835fe5107219b49c1767f.tar.xz
Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras * fc/simplify-complete-revlist-file: completion: simplify __git_complete_revlist_file
Diffstat (limited to 'contrib/completion')
-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_%...*}..."