Merge branch 'maint'
[gitweb.git] / templates / hooks--update
index 4bd9d96ff9a105cf41ba1859e243d3d6b63376ad..fd1f73d6aa48b104cc74d08dcb6a29bd3f8f08d9 100644 (file)
@@ -57,11 +57,11 @@ announcerecipients=$(git-repo-config hooks.announcelist)
 allowunannotated=$(git-repo-config --bool hooks.allowunannotated)
 
 # --- Check types
-newrev_type=$(git-cat-file -t "$newrev")
+newrev_type=$(git-cat-file -t $newrev)
 
 case "$refname","$newrev_type" in
        refs/tags/*,commit)
-               # un-annoted tag
+               # un-annotated tag
                refname_type="tag"
                short_refname=${refname##refs/tags/}
                if [ $allowunannotated != "true" ]; then
@@ -148,7 +148,7 @@ case "$refname_type" in
                        # This shows all log entries that are not already covered by
                        # another ref - i.e. commits that are now accessible from this
                        # ref that were previously not accessible
-                       git-rev-list --pretty $newref $(git-rev-parse --not --all)
+                       git-rev-parse --not --all | git-rev-list --stdin --pretty $newref
                        echo $LOGEND
                else
                        # oldrev is valid
@@ -165,7 +165,7 @@ case "$refname_type" in
                        baserev=$(git-merge-base $oldrev $newrev)
 
                        # Commit with a parent
-                       for rev in $(git-rev-list $newrev ^$baserev)
+                       for rev in $(git-rev-parse --not --all | git-rev-list --stdin $newrev ^$baserev)
                        do
                                revtype=$(git-cat-file -t "$rev")
                                echo "       via  $rev ($revtype)"
@@ -190,7 +190,8 @@ case "$refname_type" in
                        fi
                        echo ""
                        echo $LOGBEGIN
-                       git-rev-list --pretty $newrev ^$baserev
+                       git-rev-parse --not --all |
+                       git-rev-list --stdin --pretty $newrev ^$baserev
                        echo $LOGEND
                        echo ""
                        echo "Diffstat:"