diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-14 11:50:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-14 11:50:57 -0700 |
commit | fca9249b86411718a66835fe5107219b49c1767f (patch) | |
tree | cc0263681bf86258644e88b9b51e35f35f0121fb /contrib | |
parent | cc13431a49800a6a1d2b7ff0b94f67da0fecdbab (diff) | |
parent | 41e6229db4abaf08ca277115f9ac800cdc7591d6 (diff) | |
download | git-fca9249b86411718a66835fe5107219b49c1767f.tar.gz |
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')
-rwxr-xr-x | contrib/completion/git-completion.bash | 6 |
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_%...*}..." |