summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87b5054)
raw | patch | inline | side by side (parent: 87b5054)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Wed, 1 Dec 2010 18:50:46 +0000 (12:50 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 7 Dec 2010 00:41:44 +0000 (16:41 -0800) |
git submodule add -b $branch $repository
fails when HEAD already points to $branch in $repository.
Reported-by: Klaus Ethgen <Klaus@Ethgen.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fails when HEAD already points to $branch in $repository.
Reported-by: Klaus Ethgen <Klaus@Ethgen.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
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 9ebbab798d21147fc019b6183cad0c462c9dafca..09107467fe0b6e6713b527b822c8cd13b47a8e24 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
# ash fails to wordsplit ${branch:+-b "$branch"...}
case "$branch" in
'') git checkout -f -q ;;
- ?*) git checkout -f -q -b "$branch" "origin/$branch" ;;
+ ?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
esac
) || die "Unable to checkout submodule '$path'"
fi