diff --git a/Annex/Link.hs b/Annex/Link.hs index 40e56f23ef..629e77d7f2 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 diff --git a/Command/Unused.hs b/Command/Unused.hs index b6f3e93b6d..8040dc21ac 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -27,6 +27,7 @@ import qualified Remote import qualified Annex.Branch import Annex.Link import Annex.CatFile +import Annex.WorkTree import Types.RefSpec import Git.Types import Git.Sha @@ -215,10 +216,7 @@ withKeysReferenced' mdir initial a = do Just dir -> inRepo $ LsFiles.inRepo [dir] go v [] = return v go v (f:fs) = do - mk <- getM id - [ isAnnexLink f - , liftIO (isPointerFile f) - ] + mk <- lookupFile f case mk of Nothing -> go v fs Just k -> do diff --git a/debian/changelog b/debian/changelog index fc01dbdafa..e2c13be40c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ git-annex (6.20160230) UNRELEASED; urgency=medium * Fix OSX dmg to include libraries needed by bundled gpg, lost in last release. * Always try to thaw content, even when annex.crippledfilesystem is set. + * Correct git-annex info to include unlocked files in v6 repository. -- Joey Hess Mon, 29 Feb 2016 13:00:30 -0400