summaryrefslogtreecommitdiff
path: root/Logs/MetaData.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-23 00:08:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-23 00:08:29 -0400
commit704fa2fa789b453d354f2f375b0b42481c8990f6 (patch)
treeafb28b2548c067be546b22fa6b04fa8b5d76c3fd /Logs/MetaData.hs
parente0ae2f6bba897367ae23bfb1a6584ebd4843452e (diff)
annex.genmetadata can be set to make git-annex automatically set metadata (year and month) when adding files
Diffstat (limited to 'Logs/MetaData.hs')
-rw-r--r--Logs/MetaData.hs4
1 files changed, 2 insertions, 2 deletions
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