From f05875f00b4eb839fd2884e2edff95e3deca3370 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 1 Jun 2019 09:41:39 -0400 Subject: [PATCH] bug --- doc/bugs/import_tree_should_skip_.git.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/bugs/import_tree_should_skip_.git.mdwn diff --git a/doc/bugs/import_tree_should_skip_.git.mdwn b/doc/bugs/import_tree_should_skip_.git.mdwn new file mode 100644 index 0000000000..d56a8c2bf1 --- /dev/null +++ b/doc/bugs/import_tree_should_skip_.git.mdwn @@ -0,0 +1,22 @@ +If the remote being imported from has a .git directory, +the import of it fails, because git does not allow adding .git +to a repo. + +But, git *does* allow creating a tree object containing .git, it just can't +check it out. So what happens is that the remote tracking branch contains +.git, but when git is asked to merge that into master, it skips checking +out those files. + +An export back to the remote will then delete the .git directory from it. + +But note that there is *not* data loss! git-annex keeps all the files +in its object store, and the remote tracking branch contains a tree with +the .git in it, so if necessary it could be reconstructed. But with some +difficulty. + +The solution is certianly to + +1. filter out .git when importing +2. avoid deleting .git when exporting + +--[[Joey]]