diff options
author | Jeff King <peff@peff.net> | 2024-12-03 22:06:52 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 01:12:07 +0100 |
commit | 8cb4c6e62f28ac9d9a04daf794ff6dbddf55e416 (patch) | |
tree | 23594230627ae3f7b5ea7c80f7ef302f0010a072 | |
parent | fast-import: disallow more path components (diff) | |
download | git-8cb4c6e62f28ac9d9a04daf794ff6dbddf55e416.tar.xz git-8cb4c6e62f28ac9d9a04daf794ff6dbddf55e416.zip |
t9300: test verification of renamed paths
Commit da91a90c2f (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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t9300-fast-import.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index e2b1db6bc2..fd01a2353c 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -553,9 +553,16 @@ test_expect_success 'B: fail on invalid file path of .' ' commit refs/heads/badpath committer Name <email> $GIT_COMMITTER_DATE data <<COMMIT - Commit Message + Good path + COMMIT + M 100644 :1 ok-path + + commit refs/heads/badpath + committer Name <email> $GIT_COMMITTER_DATE + data <<COMMIT + Bad path COMMIT - M 100644 :1 ./invalid-path + R ok-path ./invalid-path INPUT_END test_when_finished "git update-ref -d refs/heads/badpath" && |