File: day_496__move_numcopies_safety_revisited.mdwn

package info (click to toggle)
git-annex 10.20250416-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 73,572 kB
  • sloc: haskell: 90,656; javascript: 9,103; sh: 1,469; makefile: 211; perl: 137; ansic: 44
file content (12 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
After talking it over in [[bugs/move_violates_numcopies]], we found a nicer
compromise for `git annex move`. Rather than strictly enforcing numcopies,
it avoids making any bad situations worse. For example, when there's
only one copy of a file, it can be moved even if numcopies is higher.
But, when numcopies is 2 and the source and destination repos have a copy,
move will not drop from the source repo, since that would make it worse.

Implemented that today. While doing so I got bit by the inverted Ord
instance for TrustLevel, so spent a while cleaning that up.

Today's work was sponsored by Jake Vosloo on
[Patreon](https://patreon.com/joeyh/).