The following steps are tested on Windows 10 21h1 and are designed to avoid these two bugs:
- WSL adjusted braches: smudge fails with sqlite thread crashed - locking protocol
- WSL1: git-annex-add fails in DrvFs filesystem
Setup
- Enable Developer mode in Windows settings so that symlinks can be created without elevated privileges.
- Mount the NTFS drive with metadata option.
/etc/wsl.conf
can be used or a line such asC: /mnt/c drvfs metadata
can be added in/etc/fstab
. - Create an empty directory for the repo.
- With File Explorer go to Properties/Security/Advanced.
- Give "Authenticated Users" permission to “Write attributes”, “Create files”, “Create folders” and “Delete subfolders and files” for this folder and subfolders.
- Enable case sensitivity with
setfattr -n system.wsl_case_sensitive -v 1 <path>
.- This attribute will be inherited by new subdirectories but will not be automatically recursively applied to existing subdirectories.
- Set this attribute to 0 as appropriate if you do not have files that differ only by case, or if you have non-default git-annex tuning.
- This attribute can be queried with
getfattr -n system.wsl_case_sensitive <path>
.
- With File Explorer go to Properties/Security/Advanced.
- Initialize the repo.
- Set
git config annex.crippledfilesystem true
immediately aftergit annex init
to avoid triggering the above two bugs.
- Set
- Open Properties/Security/Advanced for .git/annex/objects.
- Deny "Authenticated Users" write permissions for files only and select "Replace all child object permission entries with inheritable permission entries from this object".
Setup with repo cloned from SSH
- If you encounter problems with older versions of git-annex.
- Create a local git-annex branch from the remote branch.
- Remove the origin remote.
- Do
git annex init
and other setup. - Add back the origin remote.
Using symlinks and locked files
- Symlinks might be broken and can be fixed by recreating them. You can also delete them and do a
git checkout
.