diff options
Diffstat (limited to 'Commands.hs')
-rw-r--r-- | Commands.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Commands.hs b/Commands.hs index af6b5aad7..1364a1b35 100644 --- a/Commands.hs +++ b/Commands.hs @@ -54,7 +54,10 @@ options = [ findWanted :: CmdWants -> [String] -> Git.Repo -> IO [String] findWanted FilesNotInGit params repo = do files <- mapM (Git.notInRepo repo) params - return $ foldl (++) [] files + return $ filter notstate $ foldl (++) [] files + where + -- never include files in the state directory + notstate f = f /= take (length stateLoc) f findWanted FilesInGit params repo = do files <- mapM (Git.inRepo repo) params return $ foldl (++) [] files |