Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-15 21:44:27 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-15 21:44:27 +0400
commitccc4feb579265266d0a4a73c0c9443ecc0c26ce3 (patch)
tree9999cff451d3a833ca39981d6868fdb452449f13 /read-tree.c
parent27de946d0ee70fad497253bbaab76d2fa7b1c77c (diff)
Convert the index file reading/writing to use network byte order.
This allows using a git tree over NFS with different byte order, and makes it possible to just copy a fully populated repository and have the end result immediately usable (needing just a refresh to update the stat information).
Diffstat (limited to 'read-tree.c')
-rw-r--r--read-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-tree.c b/read-tree.c
index 9aec97fa73..5c6588da4f 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -13,8 +13,8 @@ static int read_one_entry(unsigned char *sha1, const char *base, int baselen, co
memset(ce, 0, size);
- ce->st_mode = mode;
- ce->namelen = baselen + len;
+ ce->ce_mode = htonl(mode);
+ ce->ce_namelen = htons(baselen + len);
memcpy(ce->name, base, baselen);
memcpy(ce->name + baselen, pathname, len+1);
memcpy(ce->sha1, sha1, 20);