5a9e6b1fd4
Fix bug that caused stale git-annex branch information to read when annex.private or remote.name.annex-private is set. The private journal file should not prevent reading more current information from the git-annex branch, but used to. Note that, overBranchFileContents has to do additional work now, when there's a private journal file, it reads from the branch redundantly and more slowly. Sponsored-by: Jack Hill on Patreon
62 lines
1.8 KiB
Markdown
62 lines
1.8 KiB
Markdown
### Please describe the problem.
|
|
Hello Joey, <br>
|
|
I added a private special remote (great feature BTW!) some time ago and everything seemed to work fine. Today I wanted to change the preferred content expression for another repo, but the repo that syncs with the special remote refused to accept the new expression and always showed (and used) the old one.
|
|
|
|
It looked like git-annex on the affected repo still used the `preferred-content.log` from the private journal and didn't merge it with the one from the git-annex branch.
|
|
|
|
As a workaround I manually merged both versions, put the result in `.git/annex/journal-private/preferred-content.log` and that solved the issue.
|
|
|
|
### What steps will reproduce the problem?
|
|
[[!format sh """
|
|
#!/bin/bash -x
|
|
|
|
# Initialize repo a and clone it to b
|
|
git init a
|
|
cd a
|
|
git annex init a
|
|
touch a
|
|
git annex add a
|
|
git annex sync
|
|
cd ..
|
|
git clone a b
|
|
cd b
|
|
git annex init b
|
|
git annex wanted b nothing
|
|
git annex sync
|
|
cd ../a
|
|
git remote add b ../b
|
|
git annex sync
|
|
|
|
# Add private special remote
|
|
mkdir ../special
|
|
git annex initremote --private special type=directory directory=../special encryption=none exporttree=yes importtree=no
|
|
git config remote.special.annex-tracking-branch master
|
|
git annex wanted special anything
|
|
git annex sync
|
|
|
|
# change preferred content expression for b
|
|
git annex wanted b anything
|
|
|
|
git annex wanted b
|
|
# preferred content expression for b is still "nothing"
|
|
|
|
cd ../b
|
|
git annex sync
|
|
git annex wanted b
|
|
# In the other repo it's correct
|
|
|
|
|
|
# End of transcript or log.
|
|
"""]]
|
|
|
|
### What version of git-annex are you using? On what operating system?
|
|
|
|
|
|
### Please provide any additional information below.
|
|
|
|
|
|
|
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
|
|
|
|
|
> [[fixed|done]] --[[Joey]]
|