diff options
Diffstat (limited to 't/t9304-fast-import-marks.sh')
-rwxr-xr-x | t/t9304-fast-import-marks.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t9304-fast-import-marks.sh b/t/t9304-fast-import-marks.sh index a98ef032d9..410a871c52 100755 --- a/t/t9304-fast-import-marks.sh +++ b/t/t9304-fast-import-marks.sh @@ -49,4 +49,33 @@ test_expect_success 'import with submodule mapping' ' test_cmp expect actual ' +test_expect_success 'paths adjusted for relative subdir' ' + git init deep-dst && + mkdir deep-dst/subdir && + >deep-dst/subdir/empty-marks && + git -C deep-dst/subdir fast-import \ + --rewrite-submodules-from=sub:../../from \ + --rewrite-submodules-to=sub:../../to \ + --import-marks=empty-marks \ + --export-marks=exported-marks \ + --export-pack-edges=exported-edges \ + <dump && + # we do not bother checking resulting repo; we just care that nothing + # complained about failing to open files for reading, and that files + # for writing were created in the expected spot + test_path_is_file deep-dst/subdir/exported-marks && + test_path_is_file deep-dst/subdir/exported-edges +' + +test_expect_success 'relative marks are not affected by subdir' ' + git init deep-relative && + mkdir deep-relative/subdir && + git -C deep-relative/subdir fast-import \ + --relative-marks \ + --export-marks=exported-marks \ + <dump && + test_path_is_missing deep-relative/subdir/exported-marks && + test_path_is_file deep-relative/.git/info/fast-import/exported-marks +' + test_done |