From: Shawn O. Pearce Date: Wed, 28 Feb 2007 16:48:14 GMT Subject: Re: Error "fatal: cannot pread pack file: Success" Message-ID: <20070228164814.GA5924@spearce.org> In-Reply-To: <17893.45167.334963.409569@lisa.zopyra.com> Bill Lear wrote: > fatal: cannot pread pack file: Success from=39395, packfile size=2 > fatal: index-pack died with error code 128 Gahhh. I had the arguments to lseek reversed: diff --git a/index-pack.c b/index-pack.c index cf81a99..5629c23 100644 --- a/index-pack.c +++ b/index-pack.c @@ -287,7 +287,7 @@ static void *get_data_from_pack(struct object_entry *obj) do { ssize_t n = pread(pack_fd, data + rdy, len - rdy, from + rdy); if (n <= 0) - die("cannot pread pack file: %s", strerror(errno)); + die("cannot pread pack file: %s from=%lu, packfile size=%lu", strerror(errno), from, lseek(pack_fd, 0, SEEK_END)); rdy += n; } while (rdy < len); data = xmalloc(obj->size); -- Shawn.