shithub: git9

Download patch

ref: 0846b8a3b18ee30f648f26f48dca20e83aaf672b
parent: 46f76b1cc90466f53febc6af005399ea96e14c54
author: Ori Bernstein <[email protected]>
date: Sat Oct 24 17:38:57 EDT 2020

git/fs: report corrupt objects in listing

--- a/fs.c
+++ b/fs.c
@@ -334,8 +334,10 @@
 	while(ols->idx <= i){
 		if(olsnext(ols, &h) == -1)
 			return -1;
-		if((o = readobject(h)) == nil)
+		if((o = readobject(h)) == nil){
+			fprint(2, "corrupt object %H\n", h);
 			return -1;
+		}
 	}
 	if(o != nil){
 		snprint(name, sizeof(name), "%H", o->hash);