Merge branch 'fc/rerere-conflict-style'
[gitweb.git] / contrib / hooks / post-receive-email
index 72084511e7a720448f16f94dad26ce3e7b0c9196..8747b84334f35fd378f51e6a9a433cfacc630960 100755 (executable)
@@ -22,7 +22,6 @@
 # For example, on debian the hook is stored in
 # /usr/share/git-core/contrib/hooks/post-receive-email:
 #
-#  chmod a+x post-receive-email
 #  cd /path/to/your/repository.git
 #  ln -sf /usr/share/git-core/contrib/hooks/post-receive-email hooks/post-receive
 #
@@ -242,6 +241,9 @@ generate_email_header()
        cat <<-EOF
        To: $recipients
        Subject: ${emailprefix}$projectdesc $refname_type $short_refname ${change_type}d. $describe
+       MIME-Version: 1.0
+       Content-Type: text/plain; charset=utf-8
+       Content-Transfer-Encoding: 8bit
        X-Git-Refname: $refname
        X-Git-Reftype: $refname_type
        X-Git-Oldrev: $oldrev
@@ -471,7 +473,7 @@ generate_delete_branch_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git diff-tree -s --always --pretty=oneline $oldrev
+       git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
        echo $LOGEND
 }
 
@@ -571,7 +573,7 @@ generate_delete_atag_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git diff-tree -s --always --pretty=oneline $oldrev
+       git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
        echo $LOGEND
 }
 
@@ -617,7 +619,7 @@ generate_general_email()
        echo ""
        if [ "$newrev_type" = "commit" ]; then
                echo $LOGBEGIN
-               git diff-tree -s --always --pretty=medium $newrev
+               git diff-tree -s --always --encoding=UTF-8 --pretty=medium $newrev
                echo $LOGEND
        else
                # What can we do here?  The tag marks an object that is not
@@ -636,7 +638,7 @@ generate_delete_general_email()
        echo "       was  $oldrev"
        echo ""
        echo $LOGBEGIN
-       git diff-tree -s --always --pretty=oneline $oldrev
+       git diff-tree -s --always --encoding=UTF-8 --pretty=oneline $oldrev
        echo $LOGEND
 }