removeWhenExistsWith R.removeLink dotgit
R.createSymbolicLink linktarget dotgit
- unsetcoreworktree =
- maybe (giveup "unset core.worktree failed") (\_ -> return ())
- =<< Git.Config.unset "core.worktree" r
+ -- Unsetting a config fails if it's not set, so ignore failure.
+ unsetcoreworktree = void $ Git.Config.unset "core.worktree" r
worktreefixup =
-- git-worktree sets up a "commondir" file that contains
* Directory special remotes with importtree=yes now avoid unncessary
overhead when inodes of files have changed, as happens whenever a FAT
filesystem gets remounted.
+ * Fix a bug that prevented git-annex init from working in a submodule.
-- Joey Hess <id@joeyh.name> Mon, 04 Jan 2021 12:52:41 -0400
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Besides this problem, I am super happy with git-annex and use it at work and at home daily :-)
+
+> [[fixed|done]] although w/o a way to reproduce it I can't be 100% sure
+> --[[Joey]]
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2021-01-21T18:14:09Z"
+ content="""
+Thanks Mike, that confirms it's failing to unset the config that's not set.
+
+The .git symlink is what git-annex is supposed to set up, so it should not
+need to do anything else and the question is, why does it still think it
+needs to change something?
+
+I was able to reproduce the warning, just run `git submodule add foo
+/path/to/annexrepo` and then in foo, `git-annex init` and then it
+happens part-way through. Due to two different git-annex processes both
+trying to do the same conversion, with the second one failing.
+I've fixed that.
+
+My fix will also fix your problem. But, I don't actually
+understand how to reproduce your problem. I was only able to make it happen
+when running `git-annex init` (or letting it auto-init),
+not running other git-annex commands in a repo it's already initialized.
+
+Maybe you have `GIT_DIR` set to "../../../.git/modules/..."?
+"""]]