* [PATCH] git-write-tree writes garbage on sparc64
@ 2006-05-28 19:08 Dennis Stosberg
0 siblings, 0 replies; only message in thread
From: Dennis Stosberg @ 2006-05-28 19:08 UTC (permalink / raw)
To: git
In the "next" branch, write_index_ext_header() writes garbage on a
64-bit big-endian machine; the written index file will be unreadable.
I noticed this on NetBSD/sparc64. Reproducible with:
$ git init-db
$ :>file
$ git-update-index --add file
$ git-write-tree
$ git-update-index
error: index uses extension, which we do not understand
fatal: index file corrupt
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
---
read-cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/read-cache.c b/read-cache.c
index 36bd4ea..c499c51 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -826,7 +826,7 @@ static int ce_write(SHA_CTX *context, in
}
static int write_index_ext_header(SHA_CTX *context, int fd,
- unsigned long ext, unsigned long sz)
+ unsigned int ext, unsigned int sz)
{
ext = htonl(ext);
sz = htonl(sz);
--
1.3.3.g3c38f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-28 19:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-28 19:08 [PATCH] git-write-tree writes garbage on sparc64 Dennis Stosberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).