From 5c6e1f51781fd587e459c2a14b6e31e0a39f904e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Feb 2023 15:32:09 -0400 Subject: [PATCH] bug report --- ..._it_when_ran_in_other_than_tracking_branch.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/bugs/sync_with_export_remote_deletes_files_from_it_when_ran_in_other_than_tracking_branch.mdwn diff --git a/doc/bugs/sync_with_export_remote_deletes_files_from_it_when_ran_in_other_than_tracking_branch.mdwn b/doc/bugs/sync_with_export_remote_deletes_files_from_it_when_ran_in_other_than_tracking_branch.mdwn new file mode 100644 index 0000000000..27b04f707c --- /dev/null +++ b/doc/bugs/sync_with_export_remote_deletes_files_from_it_when_ran_in_other_than_tracking_branch.mdwn @@ -0,0 +1,14 @@ + git-annex initremote d type=directory directory=../d exporttree=yes importtree=yes encryption=none + git config remote.d.annex-tracking-branch master + date > ../d/foo + git checkout -b bar + git-annex sync --content d + +This will import foo from d, but then it unexports foo from d. + +Not quite data loss, because it does honor numcopies and the local copy +remains. But bad. + +The problem seems to be that it assumes it's merged d/master into master, but +that does not happen since master is not the current branch. And so it then +updates d to look like master. --[[Joey]]