Re: Probably a GIT bug..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 23, 2008 at 09:47:17AM -0700, Junio C Hamano wrote:
> 
> That's a somewhat contrived example, and I do not know how you found it.
> 
> I suspect the same breakage would trigger when you ran out of disk quota
> to write out the tree while you still have barely enough quota to create
> the commit and update the ref, which would result in corrupt repository.

I have looked at write_sha1_file(), it appears to me that if you do not
have enough disk space (or exceed your disk quote) then this function
will die inside. For the described situation to happen, you probably
should have wrong permissions on directories (as it was simulated in the
bug report) or some other error with open() (such as exceeding the maximum
allowed number of descriptor).

So I wonder why errors in write_sha1_file() are treated differently,
i.e. the function may die on error in some error cases (such as not
enough disk space), but it indicates the error situation by return code
if open() failed.

BTW, the returned code of write_sha1_file() is also not checked in
write_tree() in mktree.c.

Dmitry
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux