While experimenting with submodules I discovered that if a submodule has a .git file "symlink" with a relative path to the real submodule repository then it cannot be added to the superproject: $ git init $ mkdir sub $ cd sub $ git init $ mv .git .real $ echo 'gitdir: .real' > .git $ echo a > a $ git add a $ git commit -m a $ cd .. $ git add sub fatal: Not a git repository: .real This patch series adds a test demonstrating the problem, and then fixes it. Brad King (2): Test update-index for a gitlink to a .git file Handle relative paths in submodule .git files setup.c | 17 +++++++++++++++++ t/t2104-update-index-gitfile.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 0 deletions(-) create mode 100755 t/t2104-update-index-gitfile.sh -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html