Skip to content

Commit 8cb4c6e

Browse files
peffgitster
authored andcommitted
t9300: test verification of renamed paths
Commit da91a90 (fast-import: disallow more path components, 2024-11-30) added two separate verify_path() calls (one for added/modified files, and one for renames/copies). But our tests only exercise the first one. Let's protect ourselves against regressions by tweaking one of the tests to rename into the bad path. There are adjacent tests that will stay as additions, so now both calls are covered. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da91a90 commit 8cb4c6e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

t/t9300-fast-import.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,16 @@ test_expect_success 'B: fail on invalid file path of .' '
553553
commit refs/heads/badpath
554554
committer Name <email> $GIT_COMMITTER_DATE
555555
data <<COMMIT
556-
Commit Message
556+
Good path
557+
COMMIT
558+
M 100644 :1 ok-path
559+
560+
commit refs/heads/badpath
561+
committer Name <email> $GIT_COMMITTER_DATE
562+
data <<COMMIT
563+
Bad path
557564
COMMIT
558-
M 100644 :1 ./invalid-path
565+
R ok-path ./invalid-path
559566
INPUT_END
560567
561568
test_when_finished "git update-ref -d refs/heads/badpath" &&

0 commit comments

Comments
 (0)