Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision de62f0f090d4a8952ddc0739fdbbc5a6f1fb4454)
+++ Jenkinsfile	(revision 7b1a6041a9b619c25955e37f6213b4381598701e)
@@ -74,26 +74,6 @@
 	status_prefix = ''
 
-	//Properties sent by the git-hooks (ref name, latest commit hash, previous commit hash)
-	// properties( [[$class: 'ParametersDefinitionProperty', parameterDefinitions: \
-	// 		[[$class: 'StringParameterDefinition', name: 'GitRefName',     defaultValue: 'master', description: 'name of the ref that changed' ], \
-	// 		 [$class: 'StringParameterDefinition', name: 'GitRefNewValue', defaultValue: 'HEAD',   description: 'new commit of the reference' ],  \
-	// 		 [$class: 'StringParameterDefinition', name: 'GitRefOldValue', defaultValue: 'HEAD~1', description: 'old commit of the reference']]   \
-	// 	]] )
+	try {
 
-	try {
-		def out_dir = pwd tmp: true
-		gitRefName = env.BRANCH_NAME
-		dir("../${gitRefName}@script") {
-			sh "git reflog > ${out_dir}/GIT_COMMIT"
-		}
-		git_reflog = readFile("${out_dir}/GIT_COMMIT")
-		gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
-		gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
-
-		echo "Properties-start"
-		echo "ref name      : ${gitRefName}"
-		echo "ref new value : ${gitRefNewValue}"
-		echo "ref old value : ${gitRefOldValue}"
-		echo "Properties-stop"
 
 		//Prevent the build from exceeding 30 minutes
@@ -102,4 +82,6 @@
 			//Wrap build to add timestamp to command line
 			wrap([$class: 'TimestamperBuildWrapper']) {
+
+				collect_git_info()
 
 				//Compile using gcc-4.9
@@ -145,4 +127,16 @@
 }
 
+def collect_git_info() {
+
+	def out_dir = pwd tmp: true
+	gitRefName = env.BRANCH_NAME
+	dir("../${gitRefName}@script") {
+		sh "git reflog > ${out_dir}/GIT_COMMIT"
+	}
+	git_reflog = readFile("${out_dir}/GIT_COMMIT")
+	gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
+	gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
+}
+
 //===========================================================================================================
 //Routine responsible of sending the email notification once the build is completed
@@ -153,4 +147,10 @@
 	def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
 
+	sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG"
+	def gitLog = readFile('GIT_LOG')
+
+	sh "git diff --stat ${gitRefNewValue} ${gitRefOldValue} > GIT_DIFF"
+	def gitDiff = readFile('GIT_DIFF')
+
 	def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}"
 	def email_body = """This is an automated email from the Jenkins build machine. It was
@@ -160,9 +160,20 @@
 
 The branch ${env.BRANCH_NAME} has been updated.
+	 via  ${gitRefOldValue} (commit)
+	from  ${gitRefNewValue} (commit)
 
-Check console output at ${env.BUILD_URL} to view the results."""
+Check console output at ${env.BUILD_URL} to view the results.
 
-	// def config = new File('/u/cforall/software/cfa/cfa-cc/config').text
-	// def email_to = (config =~ /mailinglist ?= ?(.+)/)[0][1]
+- Status --------------------------------------------------------------
+
+BUILD# ${env.BUILD_NUMBER} - ${status}
+
+- Log -----------------------------------------------------------------
+${gitLog}
+-----------------------------------------------------------------------
+Summary of changes:
+${gitDiff}
+"""
+
 	def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
 
