Merge branch 'master' into readonly-annex-merge

This commit is contained in:
Joey Hess 2021-12-27 13:46:03 -04:00
commit 6b7601c7f6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,36 @@
[[!comment format=mdwn
username="joey"
subject="""comment 5"""
date="2021-12-26T18:06:26Z"
content="""
I have this mostly implemented, in the `readonly-annex-merge` branch.
It seems to work well. Eg:
joey@darkstar:/tmp/a2>/usr/bin/git-annex whereis xxx
git-annex: .git/annex/journal.lck: openFd: permission denied (Permission denied)
- exit 1
joey@darkstar:/tmp/a2>~/bin/git-annex whereis xxx
whereis xxx (1 copy)
2a4e4ab8-6bc0-484b-aa4c-e54053cf1d87 -- joey@darkstar:/tmp/a1 [origin]
ok
One sticking point is transitions. When a remote git-annex branch has a
transition in it, and the transition has not yet been applied to the local
branch and/or other remote git-annex branches, then as this is currently
implemented, the transition will not be applied when doing the in-memory
merge.
Since the only transitions so far forget old history and dead remotes,
it's not a major effect. It would only mean that some additional information
about a dead remote would be displayed, or that `git-annex log` would
display more history.
Also, there are several couple of other things that look at the git-annex
branch, beyond simply reading a single log file, and so do not look at
unmerged branches. `git-annex log` does, --all does, etc. There are
several more.
These things break the invariant I am shooting for, that git-annex
commands will behave the same whether they are in this readonly mode or
not. They will need to be addressed before this is merged..
"""]]

View file

@ -0,0 +1,30 @@
[[!comment format=mdwn
username="joey"
subject="""comment 6"""
date="2021-12-27T17:38:49Z"
content="""
Current list of items that need to be fixed before this is mergeable:
- 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
- (skip) `--in=repository@{date}` uses loggedLocationsHistorical which uses
Annex.Branch.getHistorical, which does not look at unmerged branches.
But perhaps this is ok.. This uses the reflog, so when used to query
eg files that were present in the past, it means ones that the local
git-annex branch thought were present; other git-annex branches
may have had a different opinion but it will not show those.
And another way to look at it, the result for this will be the same
before and after merging those branches.
"""]]