git-annex/Assistant
Joey Hess 6d7ecd9e5d
merge git-annex branch in memory in read-only repository
Improved support for using git-annex in a read-only repository, git-annex
branch information from remotes that cannot be merged into the git-annex
branch will now not crash it, but will be merged in memory.

To avoid this making git-annex behave one way in a read-only repository,
and another way when it can write, it's important that Annex.Branch.get
return the same thing (modulo log file compaction) in both cases.

This manages that mostly. There are some exceptions:

- When there is a transition in one of the remote git-annex branches
  that has not yet been applied to the local or other git-annex branches.
  Transitions are not handled.
- `git-annex log` runs git log on the git-annex branch, and so
  it will not be able to show information coming from the other, not yet
  merged branches.
- Annex.Branch.files only looks at files in the git-annex branch and not
  unmerged branches. This affects git-annex info output.
- Annex.Branch.hs.overBranchFileContents ditto. Affects --all and
  also importfeed (but importfeed cannot work in a read-only repo
  anyway).
- CmdLine.Seek.seekFilteredKeys when precaching location logs.
  Note use of Annex.Branch.fullname
- Database.ContentIdentifier.needsUpdateFromLog and updateFromLog

These warts make this not suitable to be merged yet.

This readonly code path is more expensive, since it has to query several
branches. The value does get cached, but still large queries will be
slower in a read-only repository when there are unmerged git-annex
branches.

When annex.merge-annex-branches=false, updateTo skips doing anything,
and so the read-only repository code does not get triggered. So a user who
is bothered by the extra work can set that.

Other writes to the repository can still result in permissions errors.
This includes the initial creation of the git-annex branch, and of course
any writes to the git-annex branch.

Sponsored-by: Dartmouth College's Datalad project
2021-12-27 13:21:15 -04:00
..
Alert update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Install hush build warning on OSX 2020-11-13 13:34:34 -04:00
Pairing comment typo 2021-04-08 13:08:01 -04:00
Threads merge git-annex branch in memory in read-only repository 2021-12-27 13:21:15 -04:00
Types start splitting out readonly values from AnnexState 2021-04-02 15:51:44 -04:00
WebApp rename to avoid warning 2021-10-18 16:25:00 -04:00
Alert.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
BranchChange.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Changes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Commits.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Common.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
CredPairCache.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DaemonStatus.hs switch from hslogger to purpose-built Utility.Debug 2021-04-05 13:40:31 -04:00
DeleteRemote.hs auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
Drop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Fsck.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Gpg.hs be stricter about rejecting invalid configurations for remotes 2020-01-10 14:52:48 -04:00
Install.hs finished this stage of the RawFilePath conversion 2020-11-06 14:10:58 -04:00
MakeRemote.hs auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
MakeRepo.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
Monad.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
NamedThread.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pairing.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pushes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RemoteControl.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Repair.hs switch from hslogger to purpose-built Utility.Debug 2021-04-05 13:40:31 -04:00
RepoProblem.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Restart.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
ScanRemotes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Ssh.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Sync.hs merge git-annex branch in memory in read-only repository 2021-12-27 13:21:15 -04:00
TransferQueue.hs cache the serialization of a Key 2019-11-22 17:49:16 -04:00
TransferSlots.hs simplify annex.stalldetection handling 2021-09-22 10:46:10 -04:00
Unused.hs avoid failure to lock content of removed file causing drop etc to fail 2020-07-25 11:59:33 -04:00
Upgrade.hs incremental verification for web special remote 2021-08-18 15:02:22 -04:00
WebApp.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00