Pavel Roskin <proski@xxxxxxx> writes: > Hello! > > I don't know where this problem appeared, but it present in the current > git (1.5.1-rc1). Empty files become invalid objects in the repository: > > $ touch file > $ git-init > Initialized empty Git repository in .git/ > $ git-add file > $ git-commit -m "first commit" > Created initial commit 16a476808d3cb0a4758997ba58193a9dcfad0fd8 > error: garbage at end of loose object > 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391' If the error message above is linewrapped by e-mail, I think it is coming from here: static void *unpack_sha1_rest(z_stream *stream, void *buffer,... { ... if (bytes < size) { stream->next_out = buf + bytes; stream->avail_out = size - bytes; while (status == Z_OK) status = inflate(stream, Z_FINISH); } buf[size] = 0; if ((status == Z_OK || status == Z_STREAM_END) && !stream->avail_in) { inflateEnd(stream); return buf; } if (status < 0) error("corrupt loose object '%s'", sha1_to_hex(sha1)); else if (stream->avail_in) error("garbage at end of loose object '%s'", sha1_to_hex(sha1)); free(buf); return NULL; } Can you check what the value of the status is at that point? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html