Skip to content

Commit

Permalink
diff in html version so i can share as excel easily. (copy & paste)
Browse files Browse the repository at this point in the history
  • Loading branch information
palaniraja committed Mar 14, 2019
1 parent 335ff80 commit b70fdbb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions whatchanged.sh
@@ -1,19 +1,27 @@

echo "Usage: $0 <startCommitSHA> <startCommitSHA>\n\n"

rm out.txt && touch out.txt
outputFile="out.html"
rm $outputFile && touch $outputFile
# 3b9aea39c7..37c07544408b

echo "Start from Commit SHA: $1\n"
echo "End at Commit SHA: $2"

`echo "<html><head><style>td{white-space: pre;}</style></head><body><table border=1>" >> $outputFile`

git log --pretty='format:' --name-only $1..$2 | sort -u | while read line
do
if [ -n "${line}" ]; then
`echo "\n\n\n\nFile: ($line)\n--------------------------------------------\n" >> out.txt`
git log --pretty=oneline --abbrev-commit $1..$2 -- $line >> out.txt
`echo "<tr>" >> $outputFile`
`echo "<td>File: ($line)</td>" >> $outputFile`
`echo "<td>" >> $outputFile`
git log --pretty=oneline --abbrev-commit $1..$2 -- $line >> $outputFile
`echo "</td></tr>" >> $outputFile`

# --all --full-history
fi
done
`echo "</table></body></html>" >> $outputFile`

echo "\n\nSaved to out.txt"
echo "\n\nSaved to $outputFile"

0 comments on commit b70fdbb

Please sign in to comment.