[PATCH 0/2] Support relative .git file in a submodule
- From
Brad King <brad.king@kitware.com>
- Date
- Jan 8, 2010, 22:36 UTC
- Message-ID
- <1262990208-15554-1-git-send-email-brad.king@kitware.com>
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