From: Junio C Hamano Date: Thu, 4 Apr 2013 20:00:37 +0000 (-0700) Subject: Merge branch 'jk/index-pack-correct-depth-fix' into maint X-Git-Tag: v1.8.2.1~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/68447f04f45cd7689e635714bcb778cb3e2c725d?ds=inline Merge branch 'jk/index-pack-correct-depth-fix' into maint * jk/index-pack-correct-depth-fix: index-pack: always zero-initialize object_entry list --- 68447f04f45cd7689e635714bcb778cb3e2c725d diff --cc builtin/index-pack.c index ef62124aa4,6922086376..3a3051d53e --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@@ -1107,12 -1106,13 +1107,14 @@@ static void conclude_pack(int fix_thin_ objects = xrealloc(objects, (nr_objects + nr_unresolved + 1) * sizeof(*objects)); + memset(objects + nr_objects + 1, 0, + nr_unresolved * sizeof(*objects)); f = sha1fd(output_fd, curr_pack); fix_unresolved_deltas(f, nr_unresolved); - sprintf(msg, "completed with %d local objects", - nr_objects - nr_objects_initial); - stop_progress_msg(&progress, msg); + strbuf_addf(&msg, _("completed with %d local objects"), + nr_objects - nr_objects_initial); + stop_progress_msg(&progress, msg.buf); + strbuf_release(&msg); sha1close(f, tail_sha1, 0); hashcpy(read_sha1, pack_sha1); fixup_pack_header_footer(output_fd, pack_sha1,