]> git.ipfire.org Git - thirdparty/git.git/commit - pack-write.c
finish_tmp_packfile():use strbuf for pathname construction
authorSun He <sunheehnus@gmail.com>
Mon, 3 Mar 2014 09:24:29 +0000 (17:24 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Mar 2014 20:15:10 +0000 (12:15 -0800)
commit5889271114a25b6750bb6137784ae5a93df22b39
tree3f95ef844f90b9c35229cccf4d56c9ac3bcca9d0
parent2156a98045f83dd88386b2d4d3241d66bf722ade
finish_tmp_packfile():use strbuf for pathname construction

The old version fixes a maximum length on the buffer, which could be a problem
if one is not certain of the length of get_object_directory().
Using strbuf can avoid the protential bug.

Helped-by: Michael Haggerty <mhagger@alum.mit.edu>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Sun He <sunheehnus@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
bulk-checkin.c
pack-write.c
pack.h