This commit is contained in:
Joey Hess 2019-06-01 09:41:39 -04:00
parent 5d681a3ce6
commit f05875f00b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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]]