Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 664f21721c..5869c00f2d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -553,12 +553,15 @@ cmd_summary() {
test $summary_limit = 0 && return
- if rev=$(git rev-parse -q --verify "$1^0")
+ if rev=$(git rev-parse -q --verify --default HEAD ${1+"$1"})
then
head=$rev
shift
+ elif test -z "$1" -o "$1" = "HEAD"
+ then
+ return
else
- head=HEAD
+ head="HEAD"
fi
if [ -n "$files" ]