git-jump: pass "merge" arguments to ls-files

We currently throw away any arguments given to "git jump merge". We
should instead pass them along to ls-files, since they're likely to be
pathspecs. This matches the behavior of "git jump diff", etc.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2021-11-09 11:35:47 -05:00 коммит произвёл Junio C Hamano
Родитель 88d915a634
Коммит 67ba13e5a4
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -65,6 +65,9 @@ git jump diff --cached
# jump to merge conflicts
git jump merge
# documentation conflicts are hard; skip past them for now
git jump merge :^Documentation
# jump to all instances of foo_bar
git jump grep foo_bar

Просмотреть файл

@ -39,7 +39,7 @@ mode_diff() {
}
mode_merge() {
git ls-files -u |
git ls-files -u "$@" |
perl -pe 's/^.*?\t//' |
sort -u |
while IFS= read fn; do