annex.addsmallfiles: New option controlling what is done when adding files not matching annex.largefiles.

This commit is contained in:
Joey Hess 2016-01-28 14:04:32 -04:00
parent c7a89ead3a
commit 7c1df36d63
Failed to extract signature
4 changed files with 19 additions and 1 deletions

View file

@ -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

View file

@ -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

7
debian/changelog vendored
View file

@ -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

View file

@ -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