Merge branch 'ps/pack-check-bigfile-threshold'
A boundary check in 'git fsck' against the big file threshold has been corrected to prevent bogus corruption reports on packed objects whose sizes exactly match the threshold. * ps/pack-check-bigfile-threshold: pack-check: fix bogus corruption report with core.bigFileThreshold
This commit is contained in:
commit
adbe9b43f4
2 files changed
+14
-1
No files matched your search
+1
-1
@@ -134,7 +134,7 @@ static int verify_packfile(struct repository *r,
|
||||
unuse_pack(w_curs);
|
||||
|
||||
if (type == OBJ_BLOB &&
|
||||
repo_settings_get_big_file_threshold(r) <= size) {
|
||||
repo_settings_get_big_file_threshold(r) < size) {
|
||||
/*
|
||||
* Let stream_object_signature() check it with
|
||||
* the streaming interface; no point slurping
|
||||
|
||||
@@ -1152,4 +1152,17 @@ test_expect_success 'fsck reports problems in current worktree index without fil
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'fsck with blob size equal to core.bigFileThreshold' '
|
||||
test_when_finished rm -rf big-blob-fsck &&
|
||||
git init big-blob-fsck &&
|
||||
(
|
||||
cd big-blob-fsck &&
|
||||
test-tool genzeros 1024 >blob &&
|
||||
git add blob &&
|
||||
git commit -m "blob equal to threshold" &&
|
||||
git repack -ad &&
|
||||
git -c core.bigFileThreshold=1k fsck --no-dangling
|
||||
)
|
||||
'
|
||||
|
||||
test_done
|
||||
Reference in new issue
Block a user