promote forum post to bug report
This commit is contained in:
parent
c6a38d392b
commit
90ec3f2238
3 changed files with 74 additions and 0 deletions
52
doc/bugs/adjustedbranchrefresh_ignored_by_git_annex_add.mdwn
Normal file
52
doc/bugs/adjustedbranchrefresh_ignored_by_git_annex_add.mdwn
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
In some occasions `annex.adjustedbranchrefresh` is ignored when `git annex sync` is run in a branch created with `adjust --unlock-present`.
|
||||||
|
|
||||||
|
If `annex.adjustedbranchrefresh` is set to 1, one would expect git-annex to automatically adjust the branch once a file has been `git annex add`-ed or the repository is `git annex sync`-ed. However this does not happen and a manual `git annex adjust --unlock-present` is required.
|
||||||
|
|
||||||
|
Is this a bug or am I misunderstanding how `annex.adjustedbranchrefresh` is supposed to work?
|
||||||
|
|
||||||
|
> It is a bug --[[Joey]]
|
||||||
|
|
||||||
|
The following script reproduces this bug.
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
rm -Rvf /tmp/an-repo.git && mkdir /tmp/an-repo.git && cd /tmp/an-repo.git
|
||||||
|
git init --bare
|
||||||
|
n=$(date +%s) ; mkdir /tmp/ga-$n && cd /tmp/ga-$n
|
||||||
|
git clone --no-local --no-hardlinks /tmp/an-repo.git
|
||||||
|
cd an-repo/
|
||||||
|
|
||||||
|
git config user.email "email@example.com" ; git config user.name "Name Name"
|
||||||
|
git config annex.thin true
|
||||||
|
git config annex.adjustedbranchrefresh 1
|
||||||
|
git config remote.origin.annex-ignore true
|
||||||
|
|
||||||
|
# 8.20201117 is the version in the standalone tarball of 8.20201127
|
||||||
|
~/Applications/git-annex/8.20201117-ga314537cd/runshell bash -c '
|
||||||
|
git annex init foobar
|
||||||
|
|
||||||
|
echo "aaaa" > a && echo "bbbb" > b
|
||||||
|
git annex add a b
|
||||||
|
git annex sync
|
||||||
|
|
||||||
|
git annex adjust --unlock-present
|
||||||
|
git annex sync
|
||||||
|
|
||||||
|
echo "cccc" > c && echo "dddd" > d
|
||||||
|
git annex add c d
|
||||||
|
|
||||||
|
echo "## before sync"
|
||||||
|
stat -c "%n: %F" a b c d
|
||||||
|
|
||||||
|
git annex sync
|
||||||
|
echo "## after sync"
|
||||||
|
stat -c "%n: %F" a b c d # should show four regular files, but shows two files and two symlinks
|
||||||
|
|
||||||
|
git annex sync --content;
|
||||||
|
echo "## after sync --content"
|
||||||
|
stat -c "%n: %F" a b c d # ibid
|
||||||
|
'
|
||||||
|
```
|
|
@ -0,0 +1,14 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2021-01-04T20:57:22Z"
|
||||||
|
content="""
|
||||||
|
So I think the whole problem is that, git-annex add (and import, addurl,
|
||||||
|
etc) should add the files unlocked when in an unlockpresent branch.
|
||||||
|
|
||||||
|
I don't think git-annex sync needs to deal with this, problably.
|
||||||
|
|
||||||
|
Don't think this really has anything to do with adjustedbranchrefresh.
|
||||||
|
That's about updates after getting/dropping files, and that's not been done
|
||||||
|
in this case.
|
||||||
|
"""]]
|
|
@ -0,0 +1,8 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2021-01-04T20:49:40Z"
|
||||||
|
content="""
|
||||||
|
I agree, this is a bug. Copied to
|
||||||
|
[[bugs/adjustedbranchrefresh_ignored_by_git_annex_add]].
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue