Skip to content

Commit

Permalink
Merge branch 'fc/simplify-complete-revlist-file'
Browse files Browse the repository at this point in the history
By Felipe Contreras
* fc/simplify-complete-revlist-file:
  completion: simplify __git_complete_revlist_file
  • Loading branch information
Junio C Hamano committed May 14, 2012
2 parents cc13431 + 41e6229 commit fca9249
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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,$, ,
Expand All @@ -692,7 +690,7 @@ __git_complete_revlist_file ()
s,$,/,
}
s/^.* //')" \
-- "$cur_"))
"$pfx" "$cur_" ""
;;
*...*)
pfx="${cur_%...*}..."
Expand Down

0 comments on commit fca9249

Please sign in to comment.