You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loose object files are content-addressable and imutable. They should be
created on demand and deleted on repacking. However, they should not be
overwritten - assuming the initial file isn't corrupted.
The previous lack of validation meant those files were being overwritten
when in fact they could just be ignored. In Linux, this was a non-issue,
however, in Windows this operation led to Access Denied errors.
Some additional moving parts of this fix:
- [go-billy](go-git/go-billy#187): Align
behaviour supporting dir.NewObject():
- Add support for Chmod in polyfill so that ChrootOS is able to
chmod files.
- Ensure temporary directories are created for BoundOS to avoid
errors when trying to create the temporary file used for loose
files.
- This PR:
- Ensure that in Windows, packed and loose object files are created
as read-only, which in this case means setting the flag
windows.FILE_ATTRIBUTE_READONLY via x/sys/windows.
- Skip renaming the temporary file into the existing loose object,
instead simply delete the temporary file.
Relates to:
- Southclaws/sampctl#422
- git-bug/git-bug#1142
- entireio/cli#455
Signed-off-by: Paulo Gomes <[email protected]>
0 commit comments