Re: [PATCH 1/2] index-pack: Create .keep files with same permissions and .pack/.idx

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

 



On Saturday 02 April 2011, Junio C Hamano wrote:
> I was responding to the motivation stated in the commit log message, the
> file-based "cp -r" copy or cpio clone, which are _not_ a safe thing to
> do.

Hmpf. I didn't know that clone --local --no-hardlinks was unsafe. If it's 
not safe, should it still be the default behavior for a cross-filesystem 
clone?

Furthermore, this lack of safety is not at all mentioned in the clone 
documentation...

> Because "leftover .keep" alone is a good justification, I was hinting to
> drop that other motivation from the description altogether.

Whatever works best for you. What about this commit message instead?


While pushing to a remote repo, Git transiently adds a .keep file for the
pack being pushed, to protect it from a concurrent "git gc". Sometimes, when 
the push fails or is aborted, the .keep file is left stale in the repo. This 
causes problems for other users of the same repo, since the permissions on 
the .keep file (0600) make it inaccessible even though the rest of the repo 
is accessible (0444 modulo shared_repository setting).

There is no reason why the permission mode of a .keep file should be any
different from the permission mode of the corresponding .pack/.idx files.
Therefore, adjust the permission of .keep files from 0600 to 0444 modulo
the shared_repository setting.


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
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]