* `git annex adjust --unlock` will not work. Avoid `annex.addunlocked=true` and do not add multiple unlocked files to the index.
2021-10-22 22:13:46 +00:00
**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`](https://docs.microsoft.com/en-us/windows/wsl/wsl-config) can be used or a line such as `C: /mnt/c drvfs metadata` can be added in `/etc/fstab`.
2022-09-30 18:03:50 +00:00
* Follow these steps in order when creating a new repository.
* `git config annex.sshcaching false`
* `git annex init`
* git-annex should not detect the filesystem as crippled but now set `git config annex.crippledfilesystem true`
These patches may introduce problems when there are multiple independent processes writing to the repository. Use at your own risk.
<details>
<summary>Create symlink to annexed objects in-place. The add, addunused, lock, and rekey commands will create symlinks in-place instead of in a temporary directory.</summary>
```
From d871289d22d2e86cb62776841343baf6c0f83484 Mon Sep 17 00:00:00 2001
From: Reiko Asakura <asakurareiko@protonmail.ch>
Date: Wed, 12 Oct 2022 17:13:55 -0400
Subject: [PATCH 2/3] Create symlink to annexed objects in-place
- replaceWorkTreeFile file' $ makeAnnexLink l . toRawFilePath
+ makeAnnexLink l file
-- touch symlink to have same time as the original file,
-- as provided in the InodeCache
--
2.30.2
```
</details>
<details>
<summary>Recreate symlinks after remote transfer. The copy, move, get, sync commands will recreate the symlink after transferring the file from a remote.</summary>
```
From 82ea0ffb02fbc5e4003a466a216c8d1030b7d70a Mon Sep 17 00:00:00 2001
From: Reiko Asakura <asakurareiko@protonmail.ch>
Date: Wed, 12 Oct 2022 19:10:07 -0400
Subject: [PATCH 3/3] Recreate symlinks after remote transfer
---
Annex/Link.hs | 7 +++++++
Command/Get.hs | 3 ++-
Command/Move.hs | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Annex/Link.hs b/Annex/Link.hs
index 1a344d07e..e0f172d1d 100644
--- a/Annex/Link.hs
+++ b/Annex/Link.hs
@@ -96,6 +96,13 @@ getAnnexLinkTarget' file coresymlinks = if coresymlinks
* WSL1 will not create symlinks that work in Windows if created before the target file exists. This can be fixed by recreating them with any method, such as delete them and `git checkout`. Also see the above patches to make git-annex automatically recreate symlinks.
2022-09-27 00:45:22 +00:00
<details>
<summary>Sample script to recreate all symlinks under the current directory</summary>