Merge branch 'maint'
[gitweb.git] / templates / hooks--update
index e8c536fb616d9fe93fe50edf4bc862b58ad6af1b..fd1f73d6aa48b104cc74d08dcb6a29bd3f8f08d9 100644 (file)
@@ -57,7 +57,7 @@ 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)
@@ -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:"