Create pack-write.c for common pack writing code

Include a generalized fixup_pack_header_footer() in this new file.
Needed by git-repack --max-pack-size feature in a later patchset.

[sp: Moved close(pack_fd) to callers, to support index-pack, and
     changed name to better indicate it is for packfiles.]

Signed-off-by: Dana L. How <danahow@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Dana L. How
2007-05-02 12:13:14 -04:00
committed by Shawn O. Pearce
parent db81e67a7d
commit 8b0eca7c7b
4 changed files with 45 additions and 39 deletions

1
pack.h
View File

@ -44,6 +44,7 @@ struct pack_idx_header {
extern int verify_pack(struct packed_git *, int);
extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t);
#define PH_ERROR_EOF (-1)
#define PH_ERROR_PACK_SIGNATURE (-2)