Skip to content

Commit

Permalink
Display the null SHA-1 as the base for an OBJ_OFS_DELTA.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Mar 7, 2007
1 parent d9cb539 commit 30fee06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ const char *packed_object_info_detail(struct packed_git *p,
obj_offset = get_delta_base(p, &w_curs, &curpos, type, obj_offset);
if (*delta_chain_length == 0) {
/* TODO: find base_sha1 as pointed by curpos */
hashclr(base_sha1);
}
break;
case OBJ_REF_DELTA:
Expand Down

0 comments on commit 30fee06

Please sign in to comment.