From 6a1596bcaaaeea06108fd336ca9633e931d207c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 10 Feb 2015 16:06:53 -0400 Subject: 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. --- Command/MetaData.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Command/MetaData.hs') 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 -- cgit v1.2.3