rawfilepath conversion
This commit is contained in:
parent
cc32e31161
commit
f09e299156
6 changed files with 9 additions and 9 deletions
|
@ -844,7 +844,7 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
|
||||||
if L.null content'
|
if L.null content'
|
||||||
then do
|
then do
|
||||||
Annex.Queue.addUpdateIndex
|
Annex.Queue.addUpdateIndex
|
||||||
=<< inRepo (Git.UpdateIndex.unstageFile (fromRawFilePath file))
|
=<< inRepo (Git.UpdateIndex.unstageFile file)
|
||||||
-- File is deleted; can't run any other
|
-- File is deleted; can't run any other
|
||||||
-- transitions on it.
|
-- transitions on it.
|
||||||
return ()
|
return ()
|
||||||
|
|
|
@ -138,7 +138,7 @@ hashPointerFile key = hashBlob $ formatPointer key
|
||||||
stagePointerFile :: RawFilePath -> Maybe FileMode -> Sha -> Annex ()
|
stagePointerFile :: RawFilePath -> Maybe FileMode -> Sha -> Annex ()
|
||||||
stagePointerFile file mode sha =
|
stagePointerFile file mode sha =
|
||||||
Annex.Queue.addUpdateIndex =<<
|
Annex.Queue.addUpdateIndex =<<
|
||||||
inRepo (Git.UpdateIndex.stageFile sha treeitemtype $ fromRawFilePath file)
|
inRepo (Git.UpdateIndex.stageFile sha treeitemtype file)
|
||||||
where
|
where
|
||||||
treeitemtype
|
treeitemtype
|
||||||
| maybe False isExecutable mode = TreeExecutable
|
| maybe False isExecutable mode = TreeExecutable
|
||||||
|
|
|
@ -341,7 +341,7 @@ onDel' file = do
|
||||||
topfile <- inRepo (toTopFilePath (toRawFilePath file))
|
topfile <- inRepo (toTopFilePath (toRawFilePath file))
|
||||||
withkey $ flip Database.Keys.removeAssociatedFile topfile
|
withkey $ flip Database.Keys.removeAssociatedFile topfile
|
||||||
Annex.Queue.addUpdateIndex =<<
|
Annex.Queue.addUpdateIndex =<<
|
||||||
inRepo (Git.UpdateIndex.unstageFile file)
|
inRepo (Git.UpdateIndex.unstageFile (toRawFilePath file))
|
||||||
where
|
where
|
||||||
withkey a = maybe noop a =<< catKeyFile (toRawFilePath file)
|
withkey a = maybe noop a =<< catKeyFile (toRawFilePath file)
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ addFile smallorlarge file s = do
|
||||||
=<< withTSDelta (liftIO . genInodeCache file)
|
=<< withTSDelta (liftIO . genInodeCache file)
|
||||||
Large -> noop
|
Large -> noop
|
||||||
Annex.Queue.addUpdateIndex =<<
|
Annex.Queue.addUpdateIndex =<<
|
||||||
inRepo (stageFile sha treetype (fromRawFilePath file))
|
inRepo (stageFile sha treetype file)
|
||||||
return True
|
return True
|
||||||
where
|
where
|
||||||
changed a b =
|
changed a b =
|
||||||
|
|
|
@ -433,7 +433,7 @@ rewriteIndex r
|
||||||
reinject (file, sha, mode, _) = case toTreeItemType mode of
|
reinject (file, sha, mode, _) = case toTreeItemType mode of
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
Just treeitemtype -> Just <$>
|
Just treeitemtype -> Just <$>
|
||||||
UpdateIndex.stageFile sha treeitemtype (fromRawFilePath file) r
|
UpdateIndex.stageFile sha treeitemtype file r
|
||||||
|
|
||||||
newtype GoodCommits = GoodCommits (S.Set Sha)
|
newtype GoodCommits = GoodCommits (S.Set Sha)
|
||||||
|
|
||||||
|
|
|
@ -99,15 +99,15 @@ updateIndexLine sha treeitemtype file = L.fromStrict $
|
||||||
<> "\t"
|
<> "\t"
|
||||||
<> indexPath file
|
<> indexPath file
|
||||||
|
|
||||||
stageFile :: Sha -> TreeItemType -> FilePath -> Repo -> IO Streamer
|
stageFile :: Sha -> TreeItemType -> RawFilePath -> Repo -> IO Streamer
|
||||||
stageFile sha treeitemtype file repo = do
|
stageFile sha treeitemtype file repo = do
|
||||||
p <- toTopFilePath (toRawFilePath file) repo
|
p <- toTopFilePath file repo
|
||||||
return $ pureStreamer $ updateIndexLine sha treeitemtype p
|
return $ pureStreamer $ updateIndexLine sha treeitemtype p
|
||||||
|
|
||||||
{- A streamer that removes a file from the index. -}
|
{- A streamer that removes a file from the index. -}
|
||||||
unstageFile :: FilePath -> Repo -> IO Streamer
|
unstageFile :: RawFilePath -> Repo -> IO Streamer
|
||||||
unstageFile file repo = do
|
unstageFile file repo = do
|
||||||
p <- toTopFilePath (toRawFilePath file) repo
|
p <- toTopFilePath file repo
|
||||||
return $ unstageFile' p
|
return $ unstageFile' p
|
||||||
|
|
||||||
unstageFile' :: TopFilePath -> Streamer
|
unstageFile' :: TopFilePath -> Streamer
|
||||||
|
|
Loading…
Add table
Reference in a new issue