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 committed by Junio C Hamano
parent 88d915a634
commit 67ba13e5a4
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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