Skip to content

Commit fca9249

Browse files
committed
Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras * fc/simplify-complete-revlist-file: completion: simplify __git_complete_revlist_file
2 parents cc13431 + 41e6229 commit fca9249

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

contrib/completion/git-completion.bash

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,9 +676,7 @@ __git_complete_revlist_file ()
676676
*) pfx="$ref:$pfx" ;;
677677
esac
678678

679-
local IFS=$'\n'
680-
COMPREPLY=($(compgen -P "$pfx" \
681-
-W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
679+
__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
682680
| sed '/^100... blob /{
683681
s,^.* ,,
684682
s,$, ,
@@ -692,7 +690,7 @@ __git_complete_revlist_file ()
692690
s,$,/,
693691
}
694692
s/^.* //')" \
695-
-- "$cur_"))
693+
"$pfx" "$cur_" ""
696694
;;
697695
*...*)
698696
pfx="${cur_%...*}..."

0 commit comments

Comments
 (0)