X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=get_commit;h=126eff3e99aa4018265d26543dfbfa196a6a3a91;hb=HEAD;hp=3878b788e3584aa1fa7f716c8cf996d12e99d799;hpb=600be38d7f56556b17a08e82a7aad9b6d5914707;p=next-scripts 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