Avoid converting .git file in a worktree or submodule to a symlink when the repositor...
authorJoey Hess <joeyh@joeyh.name>
Mon, 9 Mar 2020 18:45:14 +0000 (14:45 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 9 Mar 2020 18:54:14 +0000 (14:54 -0400)
commitd930a2035cf2be0ffa92443375a79b338fed4272
treebe5fc4bb9d0bd5067c49c124a148fdde11a5de89
parentc0a981cb0e469c71db57a6d5d570e70ccd6b266c
Avoid converting .git file in a worktree or submodule to a symlink when the repository is not a git-annex repository.

This means it will still be a .git file when git-annex init runs. That's
ok, the repo probably contains no annexed objects yet, and even if it does,
git-annex init does not care if symlinks in the worktree don't point to the
objects.

I made init, at the end, run the conversion code. Not really necessary
because the next git-annex command could do it just as well. But, this
avoids commands that don't normally write to the repo needing to write to
it, which might avoid some problem or other, and seems worth avoiding
generally.
Annex/Fixup.hs
Annex/Init.hs
CHANGELOG
doc/bugs/running_git_annex_commands_in_worktree_of_a_non-git-annex_repo_changes_the_.git.mdwn
doc/bugs/running_git_annex_commands_in_worktree_of_a_non-git-annex_repo_changes_the_.git/comment_1_d5d8754af32ac45cd6303805bfe99911._comment [new file with mode: 0644]