source:
tools/PrettyGitLogs.sh
@
4eaefd1
Last change on this file since 4eaefd1 was eda8175, checked in by , 6 years ago | |
---|---|
|
|
File size: 577 bytes |
Rev | Line | |
---|---|---|
[36fb4ce8] | 1 | #!/bin/bash |
2 | ||
[42ee8f2] | 3 | set -e |
[36fb4ce8] | 4 | |
[42ee8f2] | 5 | GIT_UPDATE="$1/GIT_UPDATE" |
6 | GIT_LOG="$1/GIT_LOG" | |
7 | GIT_DIFF="$1/GIT_DIFF" | |
8 | ||
9 | rm -f ${GIT_UPDATE} ${GIT_LOG} ${GIT_DIFF} | |
10 | ||
11 | GitOldRef=$2 | |
12 | GitNewRef=$3 | |
[36fb4ce8] | 13 | |
[42ee8f2] | 14 | |
15 | revisions=$(git rev-list ${GitOldRef}..${GitNewRef}) | |
[36fb4ce8] | 16 | |
17 | for rev in ${revisions}; do | |
18 | type=$(git cat-file -t ${rev}) | |
[42ee8f2] | 19 | echo " via ${rev} (${type})" >> ${GIT_UPDATE} |
[36fb4ce8] | 20 | done |
21 | rev=${GitOldRef} | |
22 | type=$(git cat-file -t ${rev}) | |
[42ee8f2] | 23 | echo " from ${rev} (${type})" >> ${GIT_UPDATE} |
[36fb4ce8] | 24 | |
[42ee8f2] | 25 | git rev-list --format=short ${GitOldRef}...${GitNewRef} > ${GIT_LOG} |
[36fb4ce8] | 26 | |
[42ee8f2] | 27 | git diff --stat ${GitNewRef} ${GitOldRef} > ${GIT_DIFF} |
Note: See TracBrowser
for help on using the repository browser.