kinda a bug

This commit is contained in:
Joey Hess 2023-12-05 16:43:14 -04:00
parent b4cd985a3e
commit 1f811c340d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -0,0 +1,23 @@
joey@darkstar:~/tmp/bench/me>git init ../other
Initialized empty Git repository in /home/joey/tmp/bench/other/.git/
joey@darkstar:~/tmp/bench/me>git remote add other ../other
joey@darkstar:~/tmp/bench/me>ls
joey@darkstar:~/tmp/bench/me>date > foo
joey@darkstar:~/tmp/bench/me>git-annex add foo
With this setup, `git-annex sync --content` does not send foo to other
the first time run. However, on the second run it, does.
If the other repo had `git-annex init` ran in it first, it would sync content
to it on the first run.
Auto-init only happens once the git-annex branch gets pushed to the remote
and git-annex enumerates that remote.
So after the first sync in this situation, the remote has a synced/git-annex
branch, but no uuid yet. The second sync then auto-inits.
To fix this, sync could re-enumerate remotes after pushing, I suppose. But
re-enumerating remotes is some work so it would need to do it only for ones that
have no uuid.
Saw this happening in yann's talk. --[[Joey]]