source: tools/PrettyGitLogs.sh @ 13c98a4

arm-ehcleanup-dtorsjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since 13c98a4 was 13c98a4, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Jenkins emails now use html, this push does some work to improve how they look

  • Property mode set to 100755
File size: 749 bytes
Line 
1#!/bin/bash
2
3set -e
4
5GIT="git --git-dir=$1/.git"
6
7GIT_UPDATE="$2/GIT_UPDATE"
8GIT_LOG="$2/GIT_LOG"
9GIT_DIFF="$2/GIT_DIFF"
10
11rm -f ${GIT_UPDATE}  ${GIT_LOG}  ${GIT_DIFF}
12
13GitOldRef=$3
14GitNewRef=$4
15
16
17revisions=$(git rev-list ${GitOldRef}..${GitNewRef})
18
19for rev in ${revisions}; do
20    type=$(git cat-file -t ${rev})
21    echo "       via  ${rev} (${type})" >>  ${GIT_UPDATE}
22done
23rev=${GitOldRef}
24type=$(git cat-file -t ${rev})
25echo "      from  ${rev} (${type})" >>  ${GIT_UPDATE}
26
27git rev-list --format=short ${GitOldRef}...${GitNewRef} >  ${GIT_LOG}
28
29git diff --stat --color ${GitNewRef} ${GitOldRef} | sed -e 's/\[32m/<span style\=\"color\: \#00AA00\;\">/g' -e 's/\[31m/<span style\=\"color\: \#AA0000\;\">/g' -e 's/\[m/<\/span>/g' >  ${GIT_DIFF}
Note: See TracBrowser for help on using the repository browser.