git-annex/Upgrade
Joey Hess e2d4c133f5
init: fix data loss bug
Fix bug that lost modifications to unlocked files when init is re-ran in an
already initialized repo.

In retrospect needing scanUnlockedFiles False in the direct mode upgrade
path was a good hint that it was unsafe when used with True.

However, this bug did not affect upgrade from v5. In such an upgrade, an
unlocked file that is modified is left as-is. The only place
scanUnlockedFiles True did overwrite modified unlocked files is during an
git-annex init of a repo that was already initialized by git-annex.

(I also tried a scenario where the repo had not been initialized by
git-annex yet, but was cloned from a v7 repo with an unlocked file, and the
pointer file replaced with some other content, and the data loss did not
occur in that situation.)

Since the fixed scanUnlockedFiles avoids overwriting non-pointer files,
it should be safe to run in any situation, so there's no need any longer
for the parameter.
2019-11-05 12:41:15 -04:00
..
V5 reorg remaining direct mode code 2019-08-27 14:05:38 -04:00
V0.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
V1.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
V2.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
V3.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
V4.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
V5.hs init: fix data loss bug 2019-11-05 12:41:15 -04:00
V6.hs v7 2018-10-25 18:24:23 -04:00