(no commit message)
authorasakurareiko@f3d908c71c009580228b264f63f21c7274df7476 <asakurareiko@web>
Thu, 21 Oct 2021 21:24:24 +0000 (21:24 +0000)
committeradmin <admin@branchable.com>
Thu, 21 Oct 2021 21:24:24 +0000 (21:24 +0000)
doc/bugs/git_checkout_slow_with_unlocked_files.mdwn [new file with mode: 0644]

diff --git a/doc/bugs/git_checkout_slow_with_unlocked_files.mdwn b/doc/bugs/git_checkout_slow_with_unlocked_files.mdwn
new file mode 100644 (file)
index 0000000..6f99b87
--- /dev/null
@@ -0,0 +1,28 @@
+### Please describe the problem.
+
+git checkout is very slow to checkout unlocked files.
+
+### What steps will reproduce the problem?
+
+Setup:
+
+```
+for i in {1..1000}; do echo $i > $i; done
+git init
+git annex init
+git config annex.addunlocked true
+git annex add .
+git commit -m .
+git annex lock .
+git reset .
+```
+
+Doing a `git checkout .` at this point took about a minute. In comparison doing a `git annex unlock . && git status` took 30 seconds.
+
+### What version of git-annex are you using? On what operating system?
+
+8.20210428 in Linux.
+
+### Please provide any additional information below.
+
+The relevance of this problem is that I tried to go from a lock-adjusted branch to its basis with about 50000 unlocked files with `git checkout`. It was taking longer than expected and there were many warnings about a cosmetic problem and advised me to run `git update-index -q --refresh <path>`. Eventually I deleted the entire working tree, did `git reset --hard` to recreate the unlocked file stubs, locked every file and unlocked them again.