From c65f1b17ac78501d3eb479d89bef8aa00e5c2dd7 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sun, 8 Nov 2020 22:17:19 +0000 Subject: [PATCH] sde-commit: prerender Signed-of-by when using -s Signed-off-by: Alejandro Mery --- bin/sde-commit | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/sde-commit b/bin/sde-commit index 5d67230..94e4dad 100755 --- a/bin/sde-commit +++ b/bin/sde-commit @@ -62,7 +62,8 @@ while [ $# -gt 0 ]; do -s) signed=true; shift ;; --) shift; break ;; - *) echo_abort 1 "Unknown argument '$1', aborting." + -*) echo_abort 1 "Unknown argument '$1', aborting." ;; + *) break ;; esac shift done @@ -174,6 +175,13 @@ if [ -s $tmpfile.diff -o -s $tmpfile.status ]; then echo_msg "Status:" cat $tmpfile.status + if [ -s "$logfile" -a -n "${signed:-}" -a -e '.git' ]; then + cat <<-EOT >> $logfile + + Signed-off-by: $(git config user.name) <$(git config user.email)> + EOT + fi + quit=0 until [ $quit -ne 0 ]; do