diff options
-rw-r--r-- | Assistant/MakeRemote.hs | 6 | ||||
-rw-r--r-- | Assistant/Sync.hs | 4 | ||||
-rw-r--r-- | Assistant/Threads/Merger.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/SanityChecker.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/TransferPoller.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/TransferScanner.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/TransferWatcher.hs | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs index cce2da0af..eec383272 100644 --- a/Assistant/MakeRemote.hs +++ b/Assistant/MakeRemote.hs @@ -90,10 +90,10 @@ makeGitRemote basename location = makeRemote basename location $ \name -> - Returns the name of the remote. -} makeRemote :: String -> String -> (String -> Annex ()) -> Annex String makeRemote basename location a = do - r <- fromRepo id - if not (any samelocation $ Git.remotes r) + g <- gitRepo + if not (any samelocation $ Git.remotes g) then do - let name = uniqueRemoteName basename 0 r + let name = uniqueRemoteName basename 0 g a name return name else return basename diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index 91ee1c219..59aa6205c 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -84,7 +84,7 @@ reconnectRemotes threadname st dstatus scanremotes rs = void $ pushToRemotes :: ThreadName -> UTCTime -> ThreadState -> Maybe FailedPushMap -> [Remote] -> IO Bool pushToRemotes threadname now st mpushmap remotes = do (g, branch, u) <- runThreadState st $ (,,) - <$> fromRepo id + <$> gitRepo <*> inRepo Git.Branch.current <*> getUUID go True branch g u remotes @@ -145,7 +145,7 @@ pushToRemotes threadname now st mpushmap remotes = do {- Manually pull from remotes and merge their branches. -} manualPull :: ThreadState -> Maybe Git.Ref -> [Remote] -> IO Bool manualPull st currentbranch remotes = do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo forM_ remotes $ \r -> Git.Command.runBool "fetch" [Param $ Remote.name r] g haddiverged <- runThreadState st Annex.Branch.forceUpdate diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 0349bb1f0..46f516262 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -25,7 +25,7 @@ thisThread = "Merger" - pushes. -} mergeThread :: ThreadState -> DaemonStatusHandle -> TransferQueue -> NamedThread mergeThread st dstatus transferqueue = thread $ do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo let dir = Git.localGitDir g </> "refs" createDirectoryIfMissing True dir let hook a = Just $ runHandler st dstatus transferqueue a diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs index f01b63de3..912270090 100644 --- a/Assistant/Threads/SanityChecker.hs +++ b/Assistant/Threads/SanityChecker.hs @@ -74,7 +74,7 @@ oneDay = 24 * 60 * 60 - will block the watcher. -} check :: ThreadState -> DaemonStatusHandle -> TransferQueue -> ChangeChan -> IO Bool check st dstatus transferqueue changechan = do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo -- Find old unstaged symlinks, and add them to git. (unstaged, cleanup) <- Git.LsFiles.notInRepo False ["."] g now <- getPOSIXTime diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs index 10ed7dd31..afead63ec 100644 --- a/Assistant/Threads/TransferPoller.hs +++ b/Assistant/Threads/TransferPoller.hs @@ -24,7 +24,7 @@ thisThread = "TransferPoller" - of each transfer is complete. -} transferPollerThread :: ThreadState -> DaemonStatusHandle -> NamedThread transferPollerThread st dstatus = thread $ do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo tn <- newNotificationHandle =<< transferNotifier <$> getDaemonStatus dstatus forever $ do diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs index 85275374d..56ba63ff1 100644 --- a/Assistant/Threads/TransferScanner.hs +++ b/Assistant/Threads/TransferScanner.hs @@ -94,7 +94,7 @@ expensiveScan :: ThreadState -> DaemonStatusHandle -> TransferQueue -> [Remote] expensiveScan st dstatus transferqueue rs = unless onlyweb $ do liftIO $ debug thisThread ["starting scan of", show visiblers] void $ alertWhile dstatus (scanAlert visiblers) $ do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo (files, cleanup) <- LsFiles.inRepo [] g go files void cleanup diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs index 33f0dacbe..16d247860 100644 --- a/Assistant/Threads/TransferWatcher.hs +++ b/Assistant/Threads/TransferWatcher.hs @@ -24,7 +24,7 @@ thisThread = "TransferWatcher" - and updates the DaemonStatus's map of ongoing transfers. -} transferWatcherThread :: ThreadState -> DaemonStatusHandle -> TransferQueue -> NamedThread transferWatcherThread st dstatus transferqueue = thread $ do - g <- runThreadState st $ fromRepo id + g <- runThreadState st gitRepo let dir = gitAnnexTransferDir g createDirectoryIfMissing True dir let hook a = Just $ runHandler st dstatus transferqueue a |