From f4beed60d5ef3fdbd31ac5bd3162182fdf2bf0d3 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Tue, 17 May 2016 16:40:23 -0500 Subject: fast-import: do not truncate exported marks file Certain lines of the marks file might be corrupted (or the objects missing due to a garbage collection), but that's no reason to truncate the file and essentially destroy the rest of it. Ideally missing objects should not cause a crash, we could just skip them, but that's another patch. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- t/t9300-fast-import.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 't/t9300-fast-import.sh') diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 25bb60b28..4bca35c25 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -2650,6 +2650,21 @@ test_expect_success 'R: ignore non-git options' ' git fast-import expect <<-EOF && + :3 0000000000000000000000000000000000000000 + :1 $blob + :2 $blob + EOF + cp expect io.marks && + test_must_fail git fast-import --import-marks=io.marks --export-marks=io.marks <<-\EOF && + + EOF + test_cmp expect io.marks +' + ## ## R: very large blobs ## -- cgit v1.2.1