git-annex/Annex
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
..
AdjustedBranch fix a typo that didn't matter so far 2019-09-27 14:08:16 -04:00
Branch make DropDead transition minimize remote.log for dead sameas remotes 2019-10-15 11:39:25 -04:00
Content preserve unlocked file mtime when dropping 2019-10-08 14:01:12 -04:00
LockPool update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
MetaData update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
SpecialRemote autoenable sameas remotes 2019-10-11 15:52:40 -04:00
View update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Action.hs make WorkerStage an open type 2019-06-19 13:05:03 -04:00
AdjustedBranch.hs remove unused function 2019-10-23 12:01:34 -04:00
AutoMerge.hs remove unused import 2019-08-28 15:38:29 -04:00
BloomFilter.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Branch.hs remove empty log files in transition 2019-10-14 16:04:15 -04:00
BranchState.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CatFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ChangedRefs.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CheckAttr.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CheckIgnore.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
Common.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Concurrent.hs refactor 2019-06-19 20:19:38 -04:00
Content.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
CurrentBranch.hs refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Difference.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DirHashes.hs correct license to AGPL 2019-08-17 14:08:07 -04:00
Drop.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Environment.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Export.hs improve messages around export/import conflicts 2019-04-09 13:03:59 -04:00
FileMatcher.hs fix annex.largefiles largerthan/smallerthan bug 2019-09-30 17:15:08 -04:00
Fixup.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
GitOverlay.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
HashObject.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Hook.hs update uninit to handle all the v7 stuff 2019-10-08 14:34:00 -04:00
Import.hs add RemoteStateHandle 2019-10-14 13:51:42 -04:00
Ingest.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Init.hs init: fix data loss bug 2019-11-05 12:41:15 -04:00
InodeSentinal.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Journal.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Link.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Locations.hs init: Fix a reversion that broke initialization on systems that need to use pid locking 2019-09-10 13:37:07 -04:00
LockFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
LockPool.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Magic.hs Added --mimetype and --mimeencoding file matching options. 2019-09-19 12:09:59 -04:00
MetaData.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Multicast.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Notification.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
NumCopies.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Path.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Perms.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Queue.hs Improved locking when multiple git-annex processes are writing to the .git/index file 2019-05-06 15:15:12 -04:00
RemoteTrackingBranch.hs fix setting imported tree 2019-05-06 14:38:02 -04:00
ReplaceFile.hs avoid build warning on Windows about unused import 2019-05-23 12:15:33 -04:00
SpecialRemote.hs autoenable sameas remotes 2019-10-11 15:52:40 -04:00
Ssh.hs annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
TaggedPush.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Tmp.hs init: Fix a reversion that broke initialization on systems that need to use pid locking 2019-09-10 13:37:07 -04:00
Transfer.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
UpdateInstead.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Url.hs merge from http-client-restricted 2019-07-17 16:48:50 -04:00
UUID.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
VariantFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
VectorClock.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Version.hs one missed thing for automatic v5 -> v7 upgrades 2019-08-30 17:35:10 -04:00
View.hs fix edge case failure in prop_view_roundtrips 2019-08-16 11:35:32 -04:00
Wanted.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
WorkTree.hs init: fix data loss bug 2019-11-05 12:41:15 -04:00
YoutubeDl.hs rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00