From 704fa2fa789b453d354f2f375b0b42481c8990f6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Feb 2014 00:08:29 -0400 Subject: annex.genmetadata can be set to make git-annex automatically set metadata (year and month) when adding files --- Logs/MetaData.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Logs') diff --git a/Logs/MetaData.hs b/Logs/MetaData.hs index 77c1b56a5..63314bcef 100644 --- a/Logs/MetaData.hs +++ b/Logs/MetaData.hs @@ -55,7 +55,7 @@ getMetaData = readLog . metaDataLogFile getCurrentMetaData :: Key -> Annex MetaData getCurrentMetaData = currentMetaData . collect <$$> getMetaData where - collect = foldl' unionMetaData newMetaData . map value . S.toAscList + collect = foldl' unionMetaData emptyMetaData . map value . S.toAscList {- Adds in some metadata, which can override existing values, or unset - them, but otherwise leaves any existing metadata as-is. -} @@ -129,7 +129,7 @@ simplifyLog s = case sl of go c _ [] = c go c newer (l:ls) - | unique == newMetaData = go c newer ls + | unique == emptyMetaData = go c newer ls | otherwise = go (l { value = unique } : c) (unionMetaData unique newer) ls where -- cgit v1.2.3