aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-03-02 16:43:44 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-03-02 16:43:44 -0400
commit9b4db1bab69b678a13a1d0d2ca74a48626364c93 (patch)
treecab518e0c5b6575509fc36ebb23ff686cb3007f2 /doc
parent8f4da219cd9989092afa6a8873421894a6f73eb4 (diff)
Submodules are now supported by git-annex!
Seems to work, but still experimental until it's been tested more. When repositories are on filesystems not supporting symlinks, the .git dir symlink trick cannot be used. Since we're going to be in direct mode anyway, the .git dir symlink is not strictly needed. However, I have not fixed the code that creates new annex symlinks to handle this case -- the committed symlinks will be wrong. git annex sync happens to currently fail in a submodule using direct mode, because there's no HEAD ref. That also needs to be dealt with to get this fully working in crippled filesystems. Leaving http://github.com/datalad/datalad/issues/44 open until these issues are dealt with.
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path.mdwn6
-rw-r--r--doc/links/the_details.mdwn1
-rw-r--r--doc/submodules.mdwn21
3 files changed, 28 insertions, 0 deletions
diff --git a/doc/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path.mdwn b/doc/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path.mdwn
index f7bae3b4b..11040e301 100644
--- a/doc/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path.mdwn
+++ b/doc/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path.mdwn
@@ -63,3 +63,9 @@ I tried playing with making the repository direct and then indirect, hoping that
### Please provide any additional information below.
[[!tag confirmed]]
+
+> [[fixed|done]] -- with a current version of git, git-annex now supports
+> [[/submodules]]. NB: Filesystem must support symlinks, or this won't
+> work.
+>
+> -- [[Joey]]
diff --git a/doc/links/the_details.mdwn b/doc/links/the_details.mdwn
index a7f8633a8..cb18d5b2b 100644
--- a/doc/links/the_details.mdwn
+++ b/doc/links/the_details.mdwn
@@ -3,6 +3,7 @@
* [[encryption]]
* [[key-value backends|backends]]
* [[bare_repositories]]
+* [[submodules]]
* [[internals]]
* [[scalability]]
* [[design]]
diff --git a/doc/submodules.mdwn b/doc/submodules.mdwn
new file mode 100644
index 000000000..fe5fc9a9e
--- /dev/null
+++ b/doc/submodules.mdwn
@@ -0,0 +1,21 @@
+[Git submodules](http://git-scm.com/book/en/v2/Git-Tools-Submodules) are
+supported by git-annex since version 5.20150303.
+
+Git normally makes a `.git` **file** in a
+submodule, that points to the real git repository under `.git/modules/`.
+This presents problems for git-annex. So, when used in a submodule,
+git-annex will automatically replace the `.git` file with a symlink
+pointing at the git repository.
+
+With that taken care of, git-annex should work ok in submodules. Although
+this is a new and somewhat experimental feature.
+
+The conversion of .git file to .git symlink mostly won't bother git.
+
+Known problems:
+
+* If you want to delete a whole submodule, `git rm submodule`
+ will refuse to delete it, complaining that the
+ submodule "uses a .git directory". Workaround: Use `rm -rf`
+ to delete the tree, and then `git commit`.
+* This won't work on filesystems not supporting symlinks.