@matheusbsbs / matheus-bagliano / commits / 30fee0625d
Fork 0

Display the null SHA-1 as the base for an OBJ_OFS_DELTA.

Because we are currently cheating and never supplying the delta base for an OBJ_OFS_DELTA we get a random SHA-1 in the delta base field. Instead lets clear the hash out so its at least all 0's. This is somewhat more obvious that something fishy is going on, like we don't actually have the SHA-1 of the base handy. :) Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Mar 6, 2007 at 20:44 UTC 30fee0625d9e7012a3baf92c1315cfde751b8582
1 file changed +1
sha1_file.c
+1
@@ -1200,6 +1200,7 @@ const char *packed_object_info_detail(struct packed_git *p,
1200 obj_offset = get_delta_base(p, &w_curs, &curpos, type, obj_offset);
1201 if (*delta_chain_length == 0) {
1202 /* TODO: find base_sha1 as pointed by curpos */
1203 + hashclr(base_sha1);
1204 }
1205 break;
1206 case OBJ_REF_DELTA: