bring back OsPath changes
I hope that the windows test suite failure on appveyor was fixed by updating to a newer windows there. I have not been able to reproduce that failure in a windows 11 VM run locally.
This commit is contained in:
parent
f0ab439c95
commit
84291b6014
119 changed files with 1003 additions and 647 deletions
|
|
@ -5,6 +5,8 @@
|
|||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Remote.Helper.Git where
|
||||
|
||||
import Annex.Common
|
||||
|
|
@ -21,6 +23,7 @@ import Data.Time.Clock.POSIX
|
|||
import System.PosixCompat.Files (modificationTime)
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Set as S
|
||||
import qualified System.FilePath.ByteString as P
|
||||
|
||||
repoCheap :: Git.Repo -> Bool
|
||||
repoCheap = not . Git.repoIsUrl
|
||||
|
|
@ -59,9 +62,9 @@ guardUsable r fallback a
|
|||
|
||||
gitRepoInfo :: Remote -> Annex [(String, String)]
|
||||
gitRepoInfo r = do
|
||||
d <- fromRawFilePath <$> fromRepo Git.localGitDir
|
||||
mtimes <- liftIO $ mapM (\p -> modificationTime <$> R.getFileStatus (toRawFilePath p))
|
||||
=<< emptyWhenDoesNotExist (dirContentsRecursive (d </> "refs" </> "remotes" </> Remote.name r))
|
||||
d <- fromRepo Git.localGitDir
|
||||
mtimes <- liftIO $ mapM (\p -> modificationTime <$> R.getFileStatus p)
|
||||
=<< emptyWhenDoesNotExist (dirContentsRecursive (d P.</> "refs" P.</> "remotes" P.</> encodeBS (Remote.name r)))
|
||||
let lastsynctime = case mtimes of
|
||||
[] -> "never"
|
||||
_ -> show $ posixSecondsToUTCTime $ realToFrac $ maximum mtimes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue