From 27c7927c2f4d7641b34b09ab0c36f25a5407fd97 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 30 Sep 2020 18:17:14 +1000 Subject: [PATCH] get_commit: cpture all the Signed-off-bys as Ccs also a bit of tidying --- get_commit | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/get_commit b/get_commit index 3878b78..126eff3 100755 --- a/get_commit +++ b/get_commit @@ -1,19 +1,21 @@ #!/bin/bash commit= -if [ "$1" ]; then - commit=$1 - shift +if [ -n "$1" ]; then + commit="$1" else printf 'Usage: %s \n' "$0" 1>&2 exit 1 fi tools_dir=$(dirname "$0") +# shellcheck source=./common.sh . "$tools_dir/common.sh" "$tools_dir/clog" "$commit" -git log -1 --format='Cc: %an <%ae>%nCc: %cn <%ce>' "$commit" | sort -u +git log -1 --format='%aN <%aE>%n%cN <%cE>%n%(trailers:only=no,valueonly,unfold,key=signed-off-by)' "$commit" | + sort -u | + sed '/^\s*$/d;s/^/Cc: /' exit 0 -- 2.39.5