Skip to content

Commit

Permalink
Changed fast-import's pack header creation to use pack.h
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
spearce committed Jan 14, 2007
1 parent c44cdc7 commit c90be46
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

version = htonl(version);
ywrite(pack_fd, (char*)magic, 4);
ywrite(pack_fd, &version, 4);
ywrite(pack_fd, &zero, 4);
pack_offset = 4 * 3;
struct pack_header hdr;

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()
Expand Down

0 comments on commit c90be46

Please sign in to comment.