source: tools/PrettyGitLogs.sh @ 2407853

aaron-thesisarm-ehcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since 2407853 was 9f5bb817, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

PrettyGitLogs? now requires both the source dir and the build dir but can be called from anywhere

  • Property mode set to 100755
File size: 606 bytes
RevLine 
[36fb4ce8]1#!/bin/bash
2
[42ee8f2]3set -e
[36fb4ce8]4
[9f5bb817]5GIT="git --git-dir=$1/.git"
6
7GIT_UPDATE="$2/GIT_UPDATE"
8GIT_LOG="$2/GIT_LOG"
9GIT_DIFF="$2/GIT_DIFF"
[42ee8f2]10
11rm -f ${GIT_UPDATE}  ${GIT_LOG}  ${GIT_DIFF}
12
[9f5bb817]13GitOldRef=$3
14GitNewRef=$4
[36fb4ce8]15
[42ee8f2]16
17revisions=$(git rev-list ${GitOldRef}..${GitNewRef})
[36fb4ce8]18
19for rev in ${revisions}; do
20    type=$(git cat-file -t ${rev})
[42ee8f2]21    echo "       via  ${rev} (${type})" >>  ${GIT_UPDATE}
[36fb4ce8]22done
23rev=${GitOldRef}
24type=$(git cat-file -t ${rev})
[42ee8f2]25echo "      from  ${rev} (${type})" >>  ${GIT_UPDATE}
[36fb4ce8]26
[42ee8f2]27git rev-list --format=short ${GitOldRef}...${GitNewRef} >  ${GIT_LOG}
[36fb4ce8]28
[42ee8f2]29git diff --stat ${GitNewRef} ${GitOldRef} >  ${GIT_DIFF}
Note: See TracBrowser for help on using the repository browser.