metadata: When setting metadata, do not recurse into directories by default, since that can be surprising behavior and difficult to recover from. The old behavior is available by using --force.

This commit is contained in:
Joey Hess 2015-02-10 16:06:53 -04:00
parent 36f7e5cfdf
commit f153079152
4 changed files with 30 additions and 1 deletions

View file

@ -58,9 +58,12 @@ seek ps = do
getfield <- getOptionField getOption $ \ms ->
return $ either error id . mkMetaField <$> ms
now <- liftIO getPOSIXTime
let seeker = if null modmeta
then withFilesInGit
else withFilesInGitNonRecursive
withKeyOptions
(startKeys now getfield modmeta)
(withFilesInGit (whenAnnexed $ start now getfield modmeta))
(seeker $ whenAnnexed $ start now getfield modmeta)
ps
start :: POSIXTime -> Maybe MetaField -> [ModMeta] -> FilePath -> Key -> CommandStart