Skip to content

Commit 375f520

Browse files
committed
Merge branch 'rj/t6137-cygwin-fix' into seen
* rj/t6137-cygwin-fix: git-jump: make `diff` work with filenames containing spaces t6137-*.sh: fix test failure on cygwin
2 parents e972c1c + 390575a commit 375f520

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

contrib/git-jump/git-jump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ open_editor() {
4444
mode_diff() {
4545
git diff --no-prefix --relative "$@" |
4646
perl -ne '
47-
if (m{^\+\+\+ (.*)}) { $file = $1 eq "/dev/null" ? undef : $1; next }
47+
if (m{^\+\+\+ (.*?)\t?$}) { $file = $1 eq "/dev/null" ? undef : $1; next }
4848
defined($file) or next;
4949
if (m/^@@ .*?\+(\d+)/) { $line = $1; next }
5050
defined($line) or next;

t/t6137-pathspec-wildcards-literal.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ test_description='test wildcards and literals with git add/commit (subshell styl
33

44
. ./test-lib.sh
55

6-
test_have_prereq FUNNYNAMES || {
7-
skip_all='skipping: needs FUNNYNAMES (non-Windows only)'
6+
test_have_prereq BSLASHPSPEC || {
7+
skip_all='skipping: needs BSLASHPSPEC (backslashes in pathspecs)'
88
test_done
99
}
1010

@@ -184,7 +184,7 @@ test_expect_success 'add wildcard f?z' '
184184
)
185185
'
186186

187-
test_expect_success 'add literal \? literal' '
187+
test_expect_success 'add literal \?' '
188188
git init test-q-lit &&
189189
(
190190
cd test-q-lit &&
@@ -241,7 +241,7 @@ test_expect_success 'add literal hello\?world' '
241241
)
242242
'
243243

244-
test_expect_success 'add literal [abc]' '
244+
test_expect_success 'add literal \[abc\]' '
245245
git init test-brackets-lit &&
246246
(
247247
cd test-brackets-lit &&
@@ -280,7 +280,7 @@ test_expect_success 'commit: wildcard *' '
280280
)
281281
'
282282

283-
test_expect_success 'commit: literal *' '
283+
test_expect_success 'commit: literal \*' '
284284
git init test-c-asterisk-lit &&
285285
(
286286
cd test-c-asterisk-lit &&
@@ -328,7 +328,7 @@ test_expect_success 'commit: literal f\*' '
328328
)
329329
'
330330

331-
test_expect_success 'commit: wildcard pathspec limits commit' '
331+
test_expect_success 'commit: wildcard f**' '
332332
git init test-c-pathlimit &&
333333
(
334334
cd test-c-pathlimit &&

0 commit comments

Comments
 (0)