Skip to content

Commit 49de47c

Browse files
drafnelgitster
authored andcommitted
t/t5505-remote.sh: escape * to prevent interpretation by shell as glob
This test is supposed to check that git-remote correctly refuses to delete all URLS for the specified remote which match the '.*' regular expression. Since the '*' was not protected, it was interpreted by the shell as a file glob and expanded before being passed to git-remote. The call to git-remote still exited non-zero in this case, and the overall test still passed, but it exited non-zero because git-remote was passed the incorrect number of arguments, not for the reason it was supposed to fail. Correct the test by escaping the '*'. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3b1fbf commit 49de47c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5505-remote.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ test_expect_success 'remote set-url --add bbb' '
662662
'
663663

664664
test_expect_success 'remote set-url --delete .*' '
665-
test_must_fail git remote set-url --delete someremote .* &&
665+
test_must_fail git remote set-url --delete someremote .\* &&
666666
echo "YYY" >expect &&
667667
echo baz >>expect &&
668668
echo bbb >>expect &&

0 commit comments

Comments
 (0)