Commit Graph

2 Commits

Author SHA1 Message Date
brian m. carlson
de1954d638
lfs: honor core.sharedRepository
In order to manage a shared repository easily among multiple users, Git
has the core.sharedRepository variable, which is used to set permissions
for writing objects and files in the repository.  Teach Git LFS to
handle this as well by teaching the existing temporary file code to
honor this setting over the umask.  Since this logic is complex, add
unit and integration tests to ensure that all the code paths are
covered.
2018-10-09 15:11:18 +00:00
brian m. carlson
286c64c34b
lfs: honor umask when writing LFS file storage
When writing files to the LFS file storage, we create a temporary file
and rename it into its correct place.  Use the function that was
recently introduced to create a temporary file that honors the umask.
This should make all uses of Git LFS honor the umask, since Git handles
writing the working tree files for us.

We compute the proper permissions value on demand.  In a future commit,
we'll need to read the configuration file, and on clone, we'll want to
wait to read the configuration until we have a repository.

Add a test for this and skip it on Windows, since we cannot be
guaranteed to have POSIX permission support there.
2018-10-09 15:11:17 +00:00