summaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorSun He <sunheehnus@gmail.com>2014-03-03 17:24:29 +0800
committerJunio C Hamano <gitster@pobox.com>2014-03-03 12:15:10 -0800
commit5889271114a25b6750bb6137784ae5a93df22b39 (patch)
tree3f95ef844f90b9c35229cccf4d56c9ac3bcca9d0 /pack.h
parent2156a98045f83dd88386b2d4d3241d66bf722ade (diff)
downloadgit-5889271114a25b6750bb6137784ae5a93df22b39.tar.gz
finish_tmp_packfile():use strbuf for pathname constructionsh/finish-tmp-packfile
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>
Diffstat (limited to 'pack.h')
-rw-r--r--pack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack.h b/pack.h
index 12d951659c..3223f5a038 100644
--- a/pack.h
+++ b/pack.h
@@ -91,6 +91,6 @@ extern int encode_in_pack_object_header(enum object_type, uintmax_t, unsigned ch
extern int read_pack_header(int fd, struct pack_header *);
extern struct sha1file *create_tmp_packfile(char **pack_tmp_name);
-extern void finish_tmp_packfile(char *name_buffer, const char *pack_tmp_name, struct pack_idx_entry **written_list, uint32_t nr_written, struct pack_idx_option *pack_idx_opts, unsigned char sha1[]);
+extern void finish_tmp_packfile(struct strbuf *name_buffer, const char *pack_tmp_name, struct pack_idx_entry **written_list, uint32_t nr_written, struct pack_idx_option *pack_idx_opts, unsigned char sha1[]);
#endif