summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d773c63)
raw | patch | inline | side by side (parent: d773c63)
author | Mark Levedahl <mlevedahl@gmail.com> | |
Tue, 8 Jul 2008 02:36:40 +0000 (22:36 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 8 Jul 2008 23:37:25 +0000 (16:37 -0700) |
git-submodule add would trip if path to the submodule included a space,
or if its .git was a gitdir: link to a GIT_DIR kept elsewhere. Fix both.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
or if its .git was a gitdir: link to a GIT_DIR kept elsewhere. Fix both.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | patch | blob | history |
diff --git a/git-submodule.sh b/git-submodule.sh
index 3eb78cc724187998aa9ecf71509325631b8668c9..099a7d7560879c284c9fb2fff68f4588baaaf49b 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
# perhaps the path exists and is already a git repo, else clone it
if test -e "$path"
then
- if test -d "$path/.git" &&
- test "$(unset GIT_DIR; cd $path; git rev-parse --git-dir)" = ".git"
+ if test -d "$path"/.git -o -f "$path"/.git
then
echo "Adding existing repo at '$path' to the index"
else