This commit is contained in:
Joey Hess 2020-07-08 14:13:22 -04:00
parent d08c178f97
commit c1eaf5b930
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 11 additions and 6 deletions

View file

@ -138,12 +138,14 @@ staged' ps l repo = guardSafeForLsFiles repo $
type StagedDetails = (RawFilePath, Maybe Sha, Maybe FileMode) type StagedDetails = (RawFilePath, Maybe Sha, Maybe FileMode)
{- Returns details about all files that are staged in the index. -} {- Returns details about all files that are staged in the index.
-
- Note that, during a conflict, a file will appear in the list
- more than once.
-}
stagedDetails :: [RawFilePath] -> Repo -> IO ([StagedDetails], IO Bool) stagedDetails :: [RawFilePath] -> Repo -> IO ([StagedDetails], IO Bool)
stagedDetails = stagedDetails' [] stagedDetails = stagedDetails' []
{- Gets details about staged files, including the Sha of their staged
- contents. -}
stagedDetails' :: [CommandParam] -> [RawFilePath] -> Repo -> IO ([StagedDetails], IO Bool) stagedDetails' :: [CommandParam] -> [RawFilePath] -> Repo -> IO ([StagedDetails], IO Bool)
stagedDetails' ps l repo = guardSafeForLsFiles repo $ do stagedDetails' ps l repo = guardSafeForLsFiles repo $ do
(ls, cleanup) <- pipeNullSplit' params repo (ls, cleanup) <- pipeNullSplit' params repo

View file

@ -12,8 +12,11 @@ changed to pass the Key along.
Probably that extra round trip means the performance improvement will not Probably that extra round trip means the performance improvement will not
be as good as --all's was, but it could still be significant. be as good as --all's was, but it could still be significant.
> Actually, the key lookup can use the same --buffer trick! So ls-tree > Actually, the key lookup could use the same --buffer trick!
> to get file blob, through cat-file to get key, through cat-file to > Although this would need a way to use git ls-files to get the sha of each
> precache logs. > file, and the only way I can find is --stage, which lists the file
> repeatedly when there's a merge conflict. If that can be finessed somehow,
> pass the file sha through cat-file to get key, and then pass the location
> log for the key through cat-file to precache logs.
--[[Joey]] --[[Joey]]