Skip to content

Commit dd336a5

Browse files
bk2204gitster
authored andcommitted
builtin/repack: write object IDs of the proper length
Use the_hash_algo when calling xwrite with a hex object ID so that the proper amount of data is written. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 894c0f6 commit dd336a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/repack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack,
190190
die(_("could not start pack-objects to repack promisor objects"));
191191
}
192192

193-
xwrite(cmd->in, oid_to_hex(oid), GIT_SHA1_HEXSZ);
193+
xwrite(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
194194
xwrite(cmd->in, "\n", 1);
195195
return 0;
196196
}

0 commit comments

Comments
 (0)