From: Peter Date: Tue, 24 Mar 2009 21:05:06 GMT Subject: Re: fatal: unable to write sha1 file git 1.6.2.1 Message-ID: <49C94B02.5010604@mycircuit.org> In-Reply-To: I consolidate from Nicolas and Linus, thanks for your help: Currently, Git is unable to deal with files that it cannot load entirely in memory. What is the size of your largest file? The biggest is 51 Mb , followed by one that is 23 MB. I was able to add and commit a part of the dir tree where the biggest file was 14 Mb. So there seems to be a threshold between 23 Mb and 14 Mb. > If that is the only error message you got, then afaik the only way that > can happen is if "close(fd)" returns an error. > Yes thats the only message I got. > The only other "unable to write sha1 file" message happens if > write_buffer() fails, but if that happens then you should also have gotten > a > > file write error () > > message in addition to the "unable to write sha1 file". > > What OS? What filesystem? Are you perhaps running out of space? > Its Lenny Debian 5.0.0, Diskspace is ample . Filesystem is cifs ( this is a windows 2000 share mounted with samba in a VMware Workstation Debian client ( yes, I know ... )). Memory usage, according to htop, is constant = 140/504 MB during the whole process until git fails. > You could also try to apply this patch to get more information (Junio, > maybe worth doing regardless? We should try to avoid ambiguous error > messages that don't give full error information) > > Linus > --- > sha1_file.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/sha1_file.c b/sha1_file.c > index 4563173..54972f9 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -2287,7 +2287,7 @@ static void close_sha1_file(int fd) > fsync_or_die(fd, "sha1 file"); > fchmod(fd, 0444); > if (close(fd) != 0) > - die("unable to write sha1 file"); > + die("error when closing sha1 file (%s)", strerror(errno)); > } > > /* Size of directory component, including the ending '/' */ > -- > Will try it, thanks Peter