diff options
author | Christian Couder <christian.couder@gmail.com> | 2021-01-12 09:21:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-12 16:01:07 -0800 |
commit | 33add2ad7d6921489aa0cafd4a865504c3709512 (patch) | |
tree | 51acf64a6a338514574e8c4e42bae3232d277ffb /pack.h | |
parent | 9d7fa3be3145f1ad87bf5d4ddbf6ce8cb0e6a894 (diff) | |
download | git-33add2ad7d6921489aa0cafd4a865504c3709512.tar.gz |
fetch-pack: refactor writing promisor file
Let's replace the 2 different pieces of code that write a
promisor file in 'builtin/repack.c' and 'fetch-pack.c'
with a new function called 'write_promisor_file()' in
'pack-write.c' and 'pack.h'.
This might also help us in the future, if we want to put
back the ref names and associated hashes that were in
the promisor files we are repacking in 'builtin/repack.c'
as suggested by a NEEDSWORK comment just above the code
we are refactoring.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack.h')
-rw-r--r-- | pack.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -87,6 +87,10 @@ off_t write_pack_header(struct hashfile *f, uint32_t); void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t, unsigned char *, off_t); char *index_pack_lockfile(int fd); +struct ref; + +void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought); + /* * The "hdr" output buffer should be at least this big, which will handle sizes * up to 2^67. |