Files
training-labs/labs/osbash/tools/git_info.sh
Roger Luethi b724ef07c9 Log git information in repeat-test.sh and st.py
With this patch, repeat-test and st.py log the current state of the git
tree. This makes is easier to find out which version of the code
produced a particular set of log files.

Change-Id: If023a77d4b4522e730f8cee097114d21442168e4
2017-03-19 10:09:00 +01:00

17 lines
361 B
Bash
Executable File

#!/usr/bin/env bash
# Purpose: print current state of git tree (for logging purposes)
# Usage: git_info.sh
set -o errexit -o nounset
if ! GITEXE=$(which git); then
echo "No git executable in path. Exiting."
exit 1
fi
echo " $(git describe --all --long --dirty)"
# All active changes (un-/staged) to tracked files
git --no-pager diff HEAD -p --stat