bug
This commit is contained in:
parent
5d681a3ce6
commit
f05875f00b
1 changed files with 22 additions and 0 deletions
22
doc/bugs/import_tree_should_skip_.git.mdwn
Normal file
22
doc/bugs/import_tree_should_skip_.git.mdwn
Normal 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]]
|
Loading…
Reference in a new issue