summaryrefslogtreecommitdiff
path: root/Command/MetaData.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-10 16:06:53 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-10 16:06:53 -0400
commit6a1596bcaaaeea06108fd336ca9633e931d207c1 (patch)
tree1c594181c4031e8f7af7fc1b4758256149456282 /Command/MetaData.hs
parentebbec7ac550343034a9b0341256ca475082f88e1 (diff)
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.
Diffstat (limited to 'Command/MetaData.hs')
-rw-r--r--Command/MetaData.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Command/MetaData.hs b/Command/MetaData.hs
index a16f4214a..f1de6b6de 100644
--- a/Command/MetaData.hs
+++ b/Command/MetaData.hs
@@ -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