summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-17 06:29:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-17 06:29:30 (GMT)
commitdfe46c5ce6e68d682f80f9874f0eb107e9fee797 (patch)
tree7af1c20e18cad0a46b8c2259416ecbd85a36c697 /sha1_file.c
parent3c833cae446364872b759c7622af2760a2f81a11 (diff)
parent51054177b312ce0795f2866d4c3aed246eeccea9 (diff)
downloadgit-dfe46c5ce6e68d682f80f9874f0eb107e9fee797.zip
git-dfe46c5ce6e68d682f80f9874f0eb107e9fee797.tar.gz
git-dfe46c5ce6e68d682f80f9874f0eb107e9fee797.tar.bz2
Merge branch 'jk/loose-object-info-report-error'
Update error handling for codepath that deals with corrupt loose objects. * jk/loose-object-info-report-error: index-pack: detect local corruption in collision check sha1_loose_object_info: return error for corrupted objects
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 43990de..7369f74 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2952,7 +2952,7 @@ static int sha1_loose_object_info(const unsigned char *sha1,
if (status && oi->typep)
*oi->typep = status;
strbuf_release(&hdrbuf);
- return 0;
+ return (status < 0) ? status : 0;
}
int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, unsigned flags)