barrywardell / git-module

A tool for simplifying the management of git submodules
GNU Lesser General Public License v2.1
2 stars 0 forks source link

init-upstream does not work with .git as a gitfile, as produced by newer versions of Git #12

Open ianhinder opened 10 years ago

ianhinder commented 10 years ago

When the submodule .git is really a gitfile referring to the super-repo .git/modules/... directory, git-module init-upstream gives the error "not a directory" when trying to access submodule/.git/refs. The code should be modified to use git to do whatever it is trying to do, or follow the gitfile.

barrywardell commented 10 years ago

It should be possible to fix this by using 'git rev-parse --git-dir' to find the real .git directory rather than constructing the path ourselves.