Merge branch 'fc/simplify-complete-revlist-file'

By Felipe Contreras
* fc/simplify-complete-revlist-file:
  completion: simplify __git_complete_revlist_file
maint
Junio C Hamano 2012-05-14 11:50:57 -07:00
commit fca9249b86
1 changed files with 2 additions and 4 deletions

View File

@ -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_%...*}..."