rawfilepath conversion
authorJoey Hess <joeyh@joeyh.name>
Mon, 27 Feb 2023 19:02:53 +0000 (15:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 27 Feb 2023 19:06:32 +0000 (15:06 -0400)
Annex/Branch.hs
Annex/Link.hs
Assistant/Threads/Watcher.hs
Command/Add.hs
Git/Repair.hs
Git/UpdateIndex.hs

index b227adb32c810b7cae94f5fc47bc97693336aac3..7f03f6bece65b5d841a0199962317480413b66ac 100644 (file)
@@ -844,7 +844,7 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
                        if L.null content'
                                then do
                                        Annex.Queue.addUpdateIndex
-                                               =<< inRepo (Git.UpdateIndex.unstageFile (fromRawFilePath file))
+                                               =<< inRepo (Git.UpdateIndex.unstageFile file)
                                        -- File is deleted; can't run any other
                                        -- transitions on it.
                                        return ()
index 1a344d07efccf91b2d1ced276a617e8016c57985..ad2ce15478e20662ca22faff72fdf3cfb40589c2 100644 (file)
@@ -138,7 +138,7 @@ hashPointerFile key = hashBlob $ formatPointer key
 stagePointerFile :: RawFilePath -> Maybe FileMode -> Sha -> Annex ()
 stagePointerFile file mode sha =
        Annex.Queue.addUpdateIndex =<<
-               inRepo (Git.UpdateIndex.stageFile sha treeitemtype $ fromRawFilePath file)
+               inRepo (Git.UpdateIndex.stageFile sha treeitemtype file)
   where
        treeitemtype
                | maybe False isExecutable mode = TreeExecutable
index 8a668f0db35b2f42ee22032baaaa8fa2e4a82306..bbc4fa31c506285a16bf013945c8567abdfd8657 100644 (file)
@@ -341,7 +341,7 @@ onDel' file = do
        topfile <- inRepo (toTopFilePath (toRawFilePath file))
        withkey $ flip Database.Keys.removeAssociatedFile topfile
        Annex.Queue.addUpdateIndex =<<
-               inRepo (Git.UpdateIndex.unstageFile file)
+               inRepo (Git.UpdateIndex.unstageFile (toRawFilePath file))
   where
        withkey a = maybe noop a =<< catKeyFile (toRawFilePath file)
 
index e1742bed66cea6b136dea4441471d05d2443d92e..20ec77ae82f868c0c564e0ecc71fedba3e9afbcd 100644 (file)
@@ -182,7 +182,7 @@ addFile smallorlarge file s = do
                                        =<< withTSDelta (liftIO . genInodeCache file)
                                Large -> noop
                        Annex.Queue.addUpdateIndex =<<
-                               inRepo (stageFile sha treetype (fromRawFilePath file))
+                               inRepo (stageFile sha treetype file)
                        return True
   where
        changed a b =
index 3b51ff14791b3374c673fdeb0816618d2ee96042..601b32291ae7da2c31cbf5dc143ca6317825d7c1 100644 (file)
@@ -433,7 +433,7 @@ rewriteIndex r
        reinject (file, sha, mode, _) = case toTreeItemType mode of
                Nothing -> return Nothing
                Just treeitemtype -> Just <$>
-                       UpdateIndex.stageFile sha treeitemtype (fromRawFilePath file) r
+                       UpdateIndex.stageFile sha treeitemtype file r
 
 newtype GoodCommits = GoodCommits (S.Set Sha)
 
index 0ac21617fbdbce27f135584592494c83c1067707..f56bc86cbc0be83ab14ad26f0871a53d82b75c55 100644 (file)
@@ -99,15 +99,15 @@ updateIndexLine sha treeitemtype file = L.fromStrict $
        <> "\t"
        <> indexPath file
 
-stageFile :: Sha -> TreeItemType -> FilePath -> Repo -> IO Streamer
+stageFile :: Sha -> TreeItemType -> RawFilePath -> Repo -> IO Streamer
 stageFile sha treeitemtype file repo = do
-       p <- toTopFilePath (toRawFilePath file) repo
+       p <- toTopFilePath file repo
        return $ pureStreamer $ updateIndexLine sha treeitemtype p
 
 {- A streamer that removes a file from the index. -}
-unstageFile :: FilePath -> Repo -> IO Streamer
+unstageFile :: RawFilePath -> Repo -> IO Streamer
 unstageFile file repo = do
-       p <- toTopFilePath (toRawFilePath file) repo
+       p <- toTopFilePath file repo
        return $ unstageFile' p
 
 unstageFile' :: TopFilePath -> Streamer