comments
This commit is contained in:
parent
44d763468a
commit
a679ef04ff
2 changed files with 52 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 3"""
|
||||||
|
date="2022-10-04T17:13:21Z"
|
||||||
|
content="""
|
||||||
|
Here's my suspicion: You started with annex-tracking-branch set to
|
||||||
|
some value, and synced. Then you changed it to some other value and synced
|
||||||
|
again.
|
||||||
|
|
||||||
|
For example, if you start with it set to master:subdirectory, then
|
||||||
|
change it to master, this happens on the subsequent sync:
|
||||||
|
|
||||||
|
list directory ok
|
||||||
|
update refs/remotes/directory/master ok
|
||||||
|
|
||||||
|
Updating d946446..8dd4a6f
|
||||||
|
Fast-forward
|
||||||
|
bigfile | 1 +
|
||||||
|
foo | 1 -
|
||||||
|
subdirectory/bigfile | 1 -
|
||||||
|
|
||||||
|
So, files not in subdirectory get removed, and everything in subdirectory
|
||||||
|
is moved out of it and into the top of the tree.
|
||||||
|
|
||||||
|
Does this behavior make sense? I am not sure, but by changing
|
||||||
|
annex-tracking-branch, you have certianlly ripped the rug out from under
|
||||||
|
git-annex. And that seems to more or less match what you are describing.
|
||||||
|
|
||||||
|
(Nothing to do with being interrupted, and no merge conflicts though.)
|
||||||
|
"""]]
|
|
@ -0,0 +1,22 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 4"""
|
||||||
|
date="2022-10-04T17:21:44Z"
|
||||||
|
content="""
|
||||||
|
The reason that happens is that the remote tracking branch has a tree with
|
||||||
|
"subdirectory/bigfile" and "foo" in it. The new tree imported from the
|
||||||
|
remote, after changing annex-tracking-branch, has "bigfile" in it. So the
|
||||||
|
result is the same as if a regular git remote used to contain that old
|
||||||
|
tree, and has been updated to the new tree. `git merge` with a remote where
|
||||||
|
that has happened naturally updates master to move "subdirectory/bigfile"
|
||||||
|
to "bigfile" and to delete "foo".
|
||||||
|
|
||||||
|
I think this does beg the question of how to safely change
|
||||||
|
annex-tracking-branch. One way is to sync, change it, sync again. Then
|
||||||
|
revert the commit that imports from the remote. That gets the tree back
|
||||||
|
into the state it was before, and then syncing again will update the
|
||||||
|
remote.
|
||||||
|
|
||||||
|
Perhaps git-annex should detect when the annex-tracking-branch config
|
||||||
|
has changed, and somehow handle this better, or just refuse to sync?
|
||||||
|
"""]]
|
Loading…
Add table
Reference in a new issue