+git-annex (10.20250321) UNRELEASED; urgency=medium
+
+ * updatecluster, updateproxy: When a remote that has no annex-uuid is
+ configured as annex-cluster-node, warn and avoid writing bad data to
+ the git-annex branch.
+
+ -- Joey Hess <id@joeyh.name> Fri, 21 Mar 2025 12:27:11 -0400
+
git-annex (10.20250320) upstream; urgency=medium
* Added the compute special remote.
Nothing -> return Nothing
Just [] -> return Nothing
Just clusternames ->
- ifM (Command.UpdateProxy.checkCanProxy r "Cannot use this special remote as a cluster node.")
+ ifM (Command.UpdateProxy.checkCanProxy r "Cannot use this remote as a cluster node.")
( return $ Just $ M.fromList $
zip clusternames (repeat (S.singleton r))
, return Nothing
isproxy r
| remoteAnnexProxy (R.gitconfig r) || not (null (remoteAnnexClusterNode (R.gitconfig r))) =
- checkCanProxy r "Cannot proxy to this special remote."
+ checkCanProxy r "Cannot proxy to this remote."
| otherwise = pure False
checkCanProxy :: Remote -> String -> Annex Bool
-checkCanProxy r cannotmessage =
- ifM (R.isExportSupported r)
- ( if annexObjects (R.config r)
- then pure True
- else do
- warnannexobjects
- pure False
- , pure True
- )
+checkCanProxy r cannotmessage
+ | R.uuid r == NoUUID = do
+ warning $ UnquotedString $ unwords
+ [ R.name r
+ , "is a git remote without a known annex-uuid."
+ , cannotmessage
+ ]
+ pure False
+ | otherwise =
+ ifM (R.isExportSupported r)
+ ( if annexObjects (R.config r)
+ then pure True
+ else do
+ warnannexobjects
+ pure False
+ , pure True
+ )
where
warnannexobjects = warning $ UnquotedString $ unwords
[ R.name r
- , "is configured with exporttree=yes, but without"
- , "annexobjects=yes."
+ , "is a special remote configured with exporttree=yes,"
+ , "but without annexobjects=yes."
, cannotmessage
, "Suggest you run: git-annex enableremote"
, R.name r