git-annex/Remote
Joey Hess 0f566ed242
removal of the rest of remoteGitConfig
In keyUrls, the GitConfig is used only by annexLocations
to support configured Differences. Since such configurations affect all
clones of a repository, the local repo's GitConfig must have the same
information as the remote's GitConfig would have. So, used getGitConfig
to get the local GitConfig, which is cached and so available cheaply.

That actually fixed a bug noone had ever noticed: keyUrls is
used for remotes accessed over http. The full git config of such a
remote is normally not available, so the remoteGitConfig that keyUrls
used would not have the necessary information in it.

In copyFromRemoteCheap', it uses gitAnnexLocation,
which does need the GitConfig of the remote repo itself in order to
check if it's crippled, supports symlinks, etc. So, made the
State include that GitConfig, cached. The use of gitAnnexLocation is
within a (not $ Git.repoIsUrl repo) guard, so it's local, and so
its git config will always be read and available.

(Note that gitAnnexLocation in turn calls annexLocations, so the
Differences config it uses in this case comes from the remote repo's
GitConfig and not from the local repo's GitConfig. As explained above
this is ok since they must have the same value.)

Not very happy with this mess of different GitConfigs not type-safe and
some read only sometimes etc. Very hairy. Think I got it this change
right. Test suite passes..

This commit was sponsored by Ethan Aubin.
2018-06-05 14:48:37 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External Added EXTENSIONS to external special remote protocol. 2018-02-07 15:02:12 -04:00
Helper change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Rsync Support exporttree=yes for rsync special remotes. 2018-02-28 13:36:20 -04:00
WebDAV webdav: Avoid unncessisarily creating the collection at the top of the repo 2017-10-11 11:10:33 -04:00
Adb.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
BitTorrent.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Bup.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Ddar.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Directory.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
External.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
GCrypt.hs removal of the rest of remoteGitConfig 2018-06-05 14:48:37 -04:00
Git.hs removal of the rest of remoteGitConfig 2018-06-05 14:48:37 -04:00
Glacier.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Hook.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
List.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
P2P.hs removal of the rest of remoteGitConfig 2018-06-05 14:48:37 -04:00
Rsync.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
S3.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Tahoe.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Web.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
WebDAV.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00