git-annex/Assistant/WebApp
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
..
Configurators prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Common.hs generalize catchHardwareFault to catchIOErrorType 2015-12-06 16:26:38 -04:00
Configurators.hs webapp: full wormhole pairing UI (untested) 2016-12-27 16:41:35 -04:00
Control.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
DashBoard.hs add searchPathContents 2021-02-02 19:06:15 -04:00
Documentation.hs split BuildInfo and BuildFlags 2018-01-02 13:47:51 -04:00
Form.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Gpg.hs add searchPathContents 2021-02-02 19:06:15 -04:00
MakeRemote.hs change Remote.repo to Remote.getRepo 2018-06-04 15:30:26 -04:00
Notifications.hs Merge branch 'master' into no-xmpp 2016-12-24 15:01:55 -04:00
OtherRepos.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
Page.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Pairing.hs avoid insertWith' depreaction warning 2018-04-22 13:28:31 -04:00
Repair.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
RepoId.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
RepoList.hs cache remote.log 2020-09-22 13:52:26 -04:00
routes webapp: remove configurators for obsolste cloud storage services 2019-01-22 11:48:35 -04:00
SideBar.hs another FlexibleContexts fix 2015-05-10 15:46:59 -04:00
Types.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00