summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-31 19:40:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-31 19:40:53 (GMT)
commitbc4b9247df12e668b93cca85d6a5415e6b007368 (patch)
tree8fe06b21d28f00c5a1fdd0d3b95b937f396ef6c8 /t
parentf3913c2d03abc660140678a9e14dac399f847647 (diff)
parentf4beed60d5ef3fdbd31ac5bd3162182fdf2bf0d3 (diff)
downloadgit-bc4b9247df12e668b93cca85d6a5415e6b007368.zip
git-bc4b9247df12e668b93cca85d6a5415e6b007368.tar.gz
git-bc4b9247df12e668b93cca85d6a5415e6b007368.tar.bz2
Merge branch 'fc/fast-import-broken-marks-file'
"git fast-import --export-marks" would overwrite the existing marks file even when it makes a dump from its custom die routine. Prevent it from doing so when we have an import-marks file but haven't finished reading it. * fc/fast-import-broken-marks-file: fast-import: do not truncate exported marks file
Diffstat (limited to 't')
-rwxr-xr-xt/t9300-fast-import.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 25bb60b..4bca35c 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 <input
'
+test_expect_success 'R: corrupt lines do not mess marks file' '
+ rm -f io.marks &&
+ blob=$(echo hi | git hash-object --stdin) &&
+ cat >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
##