hooks/post-receive-email: use plumbing instead of git log/show
[gitweb.git] / contrib / hooks / post-receive-email
index 153115029df0764a3f42812a9a2bd8992360c4bd..72084511e7a720448f16f94dad26ce3e7b0c9196 100755 (executable)
@@ -471,7 +471,7 @@ generate_delete_branch_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git show -s --pretty=oneline $oldrev
+       git diff-tree -s --always --pretty=oneline $oldrev
        echo $LOGEND
 }
 
@@ -547,11 +547,11 @@ generate_atag_email()
                # performed on them
                if [ -n "$prevtag" ]; then
                        # Show changes since the previous release
-                       git rev-list --pretty=short "$prevtag..$newrev" | git shortlog
+                       git shortlog "$prevtag..$newrev"
                else
                        # No previous tag, show all the changes since time
                        # began
-                       git rev-list --pretty=short $newrev | git shortlog
+                       git shortlog $newrev
                fi
                ;;
        *)
@@ -571,7 +571,7 @@ generate_delete_atag_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git show -s --pretty=oneline $oldrev
+       git diff-tree -s --always --pretty=oneline $oldrev
        echo $LOGEND
 }
 
@@ -617,7 +617,7 @@ generate_general_email()
        echo ""
        if [ "$newrev_type" = "commit" ]; then
                echo $LOGBEGIN
-               git show --no-color --root -s --pretty=medium $newrev
+               git diff-tree -s --always --pretty=medium $newrev
                echo $LOGEND
        else
                # What can we do here?  The tag marks an object that is not
@@ -636,7 +636,7 @@ generate_delete_general_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git show -s --pretty=oneline $oldrev
+       git diff-tree -s --always --pretty=oneline $oldrev
        echo $LOGEND
 }