]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-jump: pass "merge" arguments to ls-files
authorJeff King <peff@peff.net>
Tue, 9 Nov 2021 16:35:47 +0000 (11:35 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Nov 2021 19:15:21 +0000 (11:15 -0800)
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>
contrib/git-jump/README
contrib/git-jump/git-jump

index 2f618a7f978822a0453114df0ed0045d2cf8ace5..8bcace29d21eea15e224d9ef2a841b98fdf36fac 100644 (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
 
index 931b0fe3a9483ea7394d6b30d36f92ebade09110..92dbd4cde18ea18f6933ed79648a61d0c7493796 100755 (executable)
@@ -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