From 600be38d7f56556b17a08e82a7aad9b6d5914707 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 19 Aug 2020 11:46:03 +1000 Subject: [PATCH] add get_commit a helper when constructing emails --- get_commit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 get_commit diff --git a/get_commit b/get_commit new file mode 100755 index 0000000..3878b78 --- /dev/null +++ b/get_commit @@ -0,0 +1,19 @@ +#!/bin/bash + +commit= +if [ "$1" ]; then + commit=$1 + shift +else + printf 'Usage: %s \n' "$0" 1>&2 + exit 1 +fi + +tools_dir=$(dirname "$0") +. "$tools_dir/common.sh" + +"$tools_dir/clog" "$commit" + +git log -1 --format='Cc: %an <%ae>%nCc: %cn <%ce>' "$commit" | sort -u + +exit 0 -- 2.39.5