summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b10ee76)
raw | patch | inline | side by side (parent: b10ee76)
author | Lars Hjemli <hjemli@gmail.com> | |
Mon, 11 Jun 2007 19:12:22 +0000 (21:12 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jun 2007 08:06:21 +0000 (01:06 -0700) |
After the initial clone of a submodule, no files would be checked out in
the submodule directory if the submodule HEAD was equal to the SHA-1
specified in the index of the containing repository. This fixes the problem
by simply ignoring submodule HEAD for a fresh clone.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the submodule directory if the submodule HEAD was equal to the SHA-1
specified in the index of the containing repository. This fixes the problem
by simply ignoring submodule HEAD for a fresh clone.
Signed-off-by: Lars Hjemli <hjemli@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 8bdd99a2f37a8c76fd4b08e6736d7a67da47be1e..4a6d64d61cdb2d0ca21cc4521a3955455ab3dd23 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
if ! test -d "$path"/.git
then
module_clone "$path" "$url" || exit
+ subsha1=
+ else
+ subsha1=$(unset GIT_DIR && cd "$path" &&
+ git-rev-parse --verify HEAD) ||
+ die "Unable to find current revision of submodule '$path'"
fi
- subsha1=$(unset GIT_DIR && cd "$path" &&
- git-rev-parse --verify HEAD) ||
- die "Unable to find current revision of submodule '$path'"
-
if test "$subsha1" != "$sha1"
then
(unset GIT_DIR && cd "$path" && git-fetch &&