diff options
author | 2016-03-14 13:13:56 -0400 | |
---|---|---|
committer | 2016-03-14 13:14:01 -0400 | |
commit | 589d8a9207aaf72e3562ca8ff7cf339d8dd97fa8 (patch) | |
tree | 489ba242f823a954e1dbfc3221c79b0a76e3bc12 /Annex | |
parent | aeee4a4b7093358d4cc664146e61329bfd67956b (diff) |
Correct git-annex info to include unlocked files in v6 repository.
An unlocked present file does not have a pointer file in the worktree, so
info skipped counting it.
It may be that unused was also affected by the problem, but it seemed not
to be in my tests. I think because of the use of the associatedFilesFilter.
This fix slows down both info and unused a little bit, since they have to
query the contents of files from git, but only when handling unlocked files.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Link.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Link.hs b/Annex/Link.hs index 40e56f23e..629e77d7f 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -159,7 +159,9 @@ formatPointer :: Key -> String formatPointer k = toInternalGitPath (pathSeparator:objectDir </> keyFile k) ++ "\n" -{- Checks if a file is a pointer to a key. -} +{- Checks if a worktree file is a pointer to a key. + - + - Unlocked files whose content is present are not detected by this. -} isPointerFile :: FilePath -> IO (Maybe Key) isPointerFile f = catchDefaultIO Nothing $ do b <- L.take maxPointerSz <$> L.readFile f |