git-annex/doc/bugs/Drop_doesn__39__t_respect_mincopies.mdwn
Joey Hess a166d2520b
check mincopies is satisfied even when numcopies is known to be satisfied
I had been assuming that numcopies would be a larger or at most equal to
mincopies, so no need to check both. But users get confused and use configs
that don't really make sense, so make sure to handle mincopies being larger
than numcopies.

Also add something to the mincopies man page to discourage this
misconfiguration.

This commit was sponsored by Denis Dzyubenko on Patreon.
2021-04-27 13:37:18 -04:00

22 lines
942 B
Markdown

I may be misunderstanding the purpose of mincopies, but I found this surprising. I would expect annex to not drop the file, because doing so violates the mincopies setting:
```
luckbox:orig patmaddox$ git annex mincopies
3
luckbox:orig patmaddox$ git annex whereis testmincopies
whereis testmincopies (3 copies)
1c09b94f-eed3-425d-9bbe-49aa5e575ed9 -- [s3]
c2bafb10-bf48-4ae5-a1b9-d142f2bea86a -- patmaddox@luckbox.local:~/Desktop/annex_test [here]
c8144467-348b-476d-8464-5dfe98580f0b -- patmaddox@istudo.local:~/Desktop/annex [istudo]
ok
luckbox:orig patmaddox$ git annex drop testmincopies
drop testmincopies (locking istudo...) ok
(recording state in git...)
luckbox:orig patmaddox$ git annex whereis testmincopies
whereis testmincopies (2 copies)
1c09b94f-eed3-425d-9bbe-49aa5e575ed9 -- [s3]
c8144467-348b-476d-8464-5dfe98580f0b -- patmaddox@istudo.local:~/Desktop/annex [istudo]
ok
```
> [[fixed|done]] --[[Joey]]