git-annex/Types
Joey Hess d266a41f8d
prevent numcopies or mincopies being configured to 0
Ignore annex.numcopies set to 0 in gitattributes or git config, or by
git-annex numcopies or by --numcopies, since that configuration would make
git-annex easily lose data. Same for mincopies.

This is a continuation of the work to make data only be able to be lost
when --force is used. It earlier led to the --trust option being disabled,
and similar reasoning applies here.

Most numcopies configs had docs that strongly discouraged setting it to 0
anyway. And I can't imagine a use case for setting to 0. Not that there
might not be one, but it's just so far from the intended use case of
git-annex, of managing and storing your data, that it does not seem like
it makes sense to cater to such a hypothetical use case, where any
git-annex drop can lose your data at any time.

Using a smart constructor makes sure every place avoids 0. Note that this
does mean that NumCopies is for the configured desired values, and not the
actual existing number of copies, which of course can be 0. The name
configuredNumCopies is used to make that clear.

Sponsored-by: Brock Spratlen on Patreon
2022-03-28 15:20:34 -04:00
..
ActionItem.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
AdjustedBranch.hs make sync update --unlock-present branch 2020-11-13 15:04:34 -04:00
Availability.hs
Backend.hs refactor 2021-08-18 13:19:02 -04:00
Benchmark.hs
BranchState.hs handle transitions with read-only unmerged git-annex branches 2021-12-28 13:23:32 -04:00
CatFileHandles.hs separate handles for cat-file and cat-file --batch-check 2021-09-24 13:16:13 -04:00
CleanupActions.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
Command.hs addon commands 2021-02-02 16:32:49 -04:00
Concurrency.hs have setConcurrency stop any running git coprocesses 2021-11-19 12:00:39 -04:00
Creds.hs
Crypto.hs remove Show Cipher 2020-09-01 18:11:22 -04:00
DeferredParse.hs implement fastDebug 2021-04-06 15:24:28 -04:00
DesktopNotify.hs
Difference.hs
Distribution.hs
Export.hs convert ExportLocation to ShortByteString to avoid PINNED memory fragmentation 2021-10-05 14:51:55 -04:00
FileMatcher.hs fromkey unlocked files support 2021-05-03 11:26:18 -04:00
GitConfig.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Group.hs
Import.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
IndexFiles.hs
Key.hs minor optimisation 2021-10-05 21:26:11 -04:00
KeySource.hs
Link.hs prep for fixing find --branch --unlocked 2021-03-02 13:39:31 -04:00
LockCache.hs more RawFilePath conversion 2020-10-29 10:50:29 -04:00
Messages.hs display scanning message whenever reconcileStaged has enough files to chew on 2021-06-08 12:48:30 -04:00
MetaData.hs factor out Utility.Aeson.textKey 2022-03-02 18:24:06 -04:00
Mime.hs
NumCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
ProposedAccepted.hs
RefSpec.hs Windows: include= and exclude= containing '/' will also match filenames that are written using '\' 2020-12-15 12:39:34 -04:00
Remote.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
RemoteConfig.hs
RemoteState.hs
RepoVersion.hs
ScheduledActivity.hs avoid using MonadFail in ParseDuration 2020-08-15 15:53:35 -04:00
StallDetection.hs bwlimit 2021-09-21 16:58:10 -04:00
StandardGroups.hs
StoreRetrieve.hs refactor 2021-08-18 13:19:02 -04:00
Test.hs test: Added --jobs option 2022-03-16 14:42:07 -04:00
Transfer.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Transferrer.hs simplify transferr protocol 2020-12-11 12:52:22 -04:00
TransferrerPool.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
Transitions.hs handle transitions with read-only unmerged git-annex branches 2021-12-28 13:23:32 -04:00
TrustLevel.hs
Upgrade.hs split upgrade into v9 and v10 2022-01-19 13:09:33 -04:00
UrlContents.hs
UUID.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
VectorClock.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
View.hs test: Fix some test cases that assumed git's default branch name 2020-06-23 16:40:51 -04:00
WorkerPool.hs improve transfer stages for some commands 2020-05-26 11:55:50 -04:00