mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Changed fast-import's pack header creation to use pack.h
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
c44cdc7eef
commit
c90be46abd
|
@ -800,15 +800,14 @@ static int tree_content_remove(struct tree_entry *root, const char *p)
|
|||
|
||||
static void init_pack_header()
|
||||
{
|
||||
const char* magic = "PACK";
|
||||
unsigned long version = 3;
|
||||
unsigned long zero = 0;
|
||||
struct pack_header hdr;
|
||||
|
||||
version = htonl(version);
|
||||
ywrite(pack_fd, (char*)magic, 4);
|
||||
ywrite(pack_fd, &version, 4);
|
||||
ywrite(pack_fd, &zero, 4);
|
||||
pack_offset = 4 * 3;
|
||||
hdr.hdr_signature = htonl(PACK_SIGNATURE);
|
||||
hdr.hdr_version = htonl(2);
|
||||
hdr.hdr_entries = 0;
|
||||
|
||||
ywrite(pack_fd, &hdr, sizeof(hdr));
|
||||
pack_offset = sizeof(hdr);
|
||||
}
|
||||
|
||||
static void fixup_header_footer()
|
||||
|
|
Loading…
Reference in a new issue