diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-16 22:36:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-16 22:36:35 -0400 |
commit | da453ba70149444672b8cd64e36fe34604edce73 (patch) | |
tree | d72f9886f8df45795589c37e30b8b9a2947c25ce /Commands.hs | |
parent | 19daf3fca40d99dd305a75e10dcaa8fbc734598b (diff) |
bugfix: don't add files under .git-annex
That could happen if git annex add -N were used repeatedly..
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 |