Kamil Dudka wrote:
Still not perfect. Now it produces false positives with --backup=existing:
Yes, I know that, but there's no easy way to change that without introducing a race condition the other way. I thought it better to be conservative and reject the (extremely unusual) case that you mentioned, rather than make the common case significantly less-efficient or (worse) to lose data in some rare cases.
I suppose we could change the diagnostic to say "might destroy source" rather than "would destroy source". That would be more accurate.
As for the test, could it be simplified like this?
Could be. I didn't look at the test in detail (it's now the same as before).
