From a679ef04ff447443ad108d85e29016992f4a7552 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Oct 2022 13:36:38 -0400 Subject: [PATCH] comments --- ..._f964c18aced83ba02d3436941dbcbacc._comment | 30 +++++++++++++++++++ ..._1f819796ec13f83e56917332efffe54d._comment | 22 ++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 doc/bugs/android_sync_messes_tree/comment_3_f964c18aced83ba02d3436941dbcbacc._comment create mode 100644 doc/bugs/android_sync_messes_tree/comment_4_1f819796ec13f83e56917332efffe54d._comment diff --git a/doc/bugs/android_sync_messes_tree/comment_3_f964c18aced83ba02d3436941dbcbacc._comment b/doc/bugs/android_sync_messes_tree/comment_3_f964c18aced83ba02d3436941dbcbacc._comment new file mode 100644 index 0000000000..21d246634b --- /dev/null +++ b/doc/bugs/android_sync_messes_tree/comment_3_f964c18aced83ba02d3436941dbcbacc._comment @@ -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.) +"""]] diff --git a/doc/bugs/android_sync_messes_tree/comment_4_1f819796ec13f83e56917332efffe54d._comment b/doc/bugs/android_sync_messes_tree/comment_4_1f819796ec13f83e56917332efffe54d._comment new file mode 100644 index 0000000000..c906c027f4 --- /dev/null +++ b/doc/bugs/android_sync_messes_tree/comment_4_1f819796ec13f83e56917332efffe54d._comment @@ -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? +"""]]