initremote type=git probe uuid
authorJoey Hess <joeyh@joeyh.name>
Thu, 9 Jun 2022 17:16:50 +0000 (13:16 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 9 Jun 2022 17:16:50 +0000 (13:16 -0400)
commit14584e7a384be87e2fd613ef93a8393d91c0842f
treed077ecd5372606c8b50bfbb9a6688f3b755d5891
parent2f509e529e765b878f210fbfe6178bc139736230
initremote type=git probe uuid

rather than matching path of an existing remote to find the uuid.

The main benefit of this is that locations not using ssh:// will work
now, including both paths and host:/path

The other benefit is that it's a simpler interface, no need to have an
existing remote with the same url and some other name. Although that
will still work of course.

This does rely on tryGitConfigRead working when given a Git.Repo that is
not a remote. Luckily, it works fine that way.

Also, tryGitConfigRead will auto-init a local repo that has a git-annex
branch. I did not enable auto-init of ssh repos though.

The uuid discovery actually happens twice; initremote discovers it,
and uses it to store the special remote config, but does not set it in the
git remote it creates. So the next run of git-annex does uuid discovery
again, and caches it that time. This could be improved for a tiny
speedup, but I didn't want to complicate things for that in this
commit.

Sponsored-by: Dartmouth College's DANDI project
CHANGELOG
Remote/Git.hs
doc/bugs/initremote_type__61__git_is_not_working_for_unkn_reason.mdwn
doc/bugs/initremote_type__61__git_is_not_working_for_unkn_reason/comment_2_0baadee49b21451a99a38306a98e3e56._comment [new file with mode: 0644]
doc/special_remotes/git.mdwn