diff options
-rw-r--r-- | Command/Add.hs | 5 | ||||
-rw-r--r-- | Types/GitConfig.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 6 |
4 files changed, 19 insertions, 1 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 23c9318fd..7a1150d10 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -49,7 +49,10 @@ seek o = allowConcurrentOutput $ do matcher <- largeFilesMatcher let gofile file = ifM (checkFileMatcher matcher file <||> Annex.getState Annex.force) ( start file - , startSmall file + , ifM (annexAddSmallFiles <$> Annex.getGitConfig) + ( startSmall file + , stop + ) ) case batchOption o of Batch -> batchFiles gofile diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index 208da4ac7..fbc3484d0 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -54,6 +54,7 @@ data GitConfig = GitConfig , annexWebDownloadCommand :: Maybe String , annexCrippledFileSystem :: Bool , annexLargeFiles :: Maybe String + , annexAddSmallFiles :: Bool , annexFsckNudge :: Bool , annexAutoUpgrade :: AutoUpgrade , annexExpireUnused :: Maybe (Maybe Duration) @@ -99,6 +100,7 @@ extractGitConfig r = GitConfig , annexWebDownloadCommand = getmaybe (annex "web-download-command") , annexCrippledFileSystem = getbool (annex "crippledfilesystem") False , annexLargeFiles = getmaybe (annex "largefiles") + , annexAddSmallFiles = getbool (annex "addsmallfiles") True , annexFsckNudge = getbool (annex "fscknudge") True , annexAutoUpgrade = toAutoUpgrade $ getmaybe (annex "autoupgrade") , annexExpireUnused = maybe Nothing Just . parseDuration diff --git a/debian/changelog b/debian/changelog index e61aa22a1..705fb0f52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +git-annex (6.20160127) UNRELEASED; urgency=medium + + * annex.addsmallfiles: New option controlling what is done when + adding files not matching annex.largefiles. + + -- Joey Hess <id@joeyh.name> Thu, 28 Jan 2016 13:53:09 -0400 + git-annex (6.20160126) unstable; urgency=medium * Fix nasty reversion in the last release that broke sync --content's diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 91ae78559..471f21957 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -828,6 +828,12 @@ Here are all the supported configuration settings. git annex add -c annex.largefiles='include=*' 99kbfile +* `annex.addsmallfiles` + + Controls whether small files (not matching annex.largefiles) + should be checked into git by `git annex add`. Defaults to true; + set to false to instead make small files be skipped. + * `annex.numcopies` This is a deprecated setting. You should instead use the |