Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Changed fast-import's pack header creation to use pack.h
author
Shawn O. Pearce
<spearce@spearce.org>
Wed, 16 Aug 2006 05:57:57 +0000
(
01:57
-0400)
committer
Shawn O. Pearce
<spearce@spearce.org>
Sun, 14 Jan 2007 07:15:04 +0000
(
02:15
-0500)
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c44cdc7
)
diff --git
a/fast-import.c
b/fast-import.c
index 2953e80cde573ffe461e7917b47c576f74e04612..d5651693ba5e48c980c4eb3854480234f2e536ce 100644
(file)
--- a/
fast-import.c
+++ b/
fast-import.c
@@
-800,15
+800,14
@@
static int tree_content_remove(struct tree_entry *root, const char *p)
static void init_pack_header()
{
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()
}
static void fixup_header_footer()