diff options
-rw-r--r-- | Command/Unused.hs | 2 | ||||
-rw-r--r-- | Git/LsFiles.hs | 6 | ||||
-rw-r--r-- | debian/changelog | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 0a060aae6..7c43cbc6f 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -241,7 +241,7 @@ withKeysReferenced' mdir initial a = do ( return ([], return True) , do top <- fromRepo Git.repoPath - inRepo $ LsFiles.inRepo [top] + inRepo $ LsFiles.allFiles [top] ) Just dir -> inRepo $ LsFiles.inRepo [dir] go v [] = return v diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs index f4e467215..e2e29ea36 100644 --- a/Git/LsFiles.hs +++ b/Git/LsFiles.hs @@ -8,6 +8,7 @@ module Git.LsFiles ( inRepo, notInRepo, + allFiles, deleted, modified, staged, @@ -41,6 +42,11 @@ notInRepo include_ignored l repo = pipeNullSplit params repo | include_ignored = [] | otherwise = [Param "--exclude-standard"] +{- Finds all files in the specified locations, whether checked into git or + - not. -} +allFiles :: [FilePath] -> Repo -> IO ([FilePath], IO Bool) +allFiles l = pipeNullSplit $ Params "ls-files --cached --others -z --" : map File l + {- Returns a list of files in the specified locations that have been - deleted. -} deleted :: [FilePath] -> Repo -> IO ([FilePath], IO Bool) diff --git a/debian/changelog b/debian/changelog index 3101a99bd..571b4112e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ git-annex (4.20130816) UNRELEASED; urgency=low --duplicate, --deduplicate, and --clean-duplicates * mirror: New command, makes two repositories contain the same set of files. * Set --clobber when running wget to ensure resuming works properly. + * unused: Pay attention to symlinks that are not yet staged in the index. -- Joey Hess <joeyh@debian.org> Thu, 15 Aug 2013 15:47:52 +0200 |