]> dgit.raspbian.org Git - git-annex.git/commitdiff
git-remote-annex: use annexLocationsBare
authorJoey Hess <joeyh@joeyh.name>
Fri, 2 Aug 2024 17:13:44 +0000 (13:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 2 Aug 2024 17:13:44 +0000 (13:13 -0400)
There was no good reason for it to be using annexLocationsNonBare,
and exporttree=yes annexobjects=yes is going to use annexLocationsBare,
so this should as well for consistency.

Since all returned ExportLocations are tried when retrieving objects,
this won't break backwards compatability.

CmdLine/GitRemoteAnnex.hs

index ae06d76d7a768ef9bffcb96071a429f5cb059283..5d95c34bb11ed83bdbc2b712fba9f93323cbbed6 100644 (file)
@@ -1010,14 +1010,13 @@ getKeyExportLocations rmt k = do
 -- inside the .git/annex/objects/ directory in the remote.
 --
 -- The first ExportLocation in the returned list is the one that
--- is the same as the local repository would use. But it's possible
--- that one of the others in the list was used by another repository to
--- upload a git key.
+-- should be used to store a key. But it's possible
+-- that one of the others in the list was used.
 keyExportLocations :: Remote -> Key -> GitConfig -> UUID -> Maybe [ExportLocation]
 keyExportLocations rmt k cfg uuid
        | exportTree (Remote.config rmt) || importTree (Remote.config rmt) = 
                Just $ map (\p -> mkExportLocation (".git" P.</> p)) $
-                       concatMap (`annexLocationsNonBare` k) cfgs
+                       concatMap (`annexLocationsBare` k) cfgs
        | otherwise = Nothing
   where
        -- When git-annex has not been initialized yet (eg, when cloning),