aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-02-26 23:25:23 +0100
committerRobin Jarry <robin@jarry.cc>2024-04-13 22:36:57 +0200
commit953355acc950c53ee95469bad2ee9e9c206970a3 (patch)
treef06b4702a12641983021a4ddc5147a2d60fb1c8b /contrib
parent1b912fbbe98ae9b0a78da2b448f6121944d9b9b1 (diff)
downloadaerc-953355acc950c53ee95469bad2ee9e9c206970a3.tar.gz
sendemail-validate: add fallback for older git
Before version 2.41, the sendemail-validate script can only be used to validate patches one by one, even when sending patch series. Set both GIT_SENDEMAIL_FILE_{COUNTER,TOTAL} to 1 in case they are not defined to avoid obscure errors. At least with older git versions, single patch validation should be possible. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/sendemail-validate4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/sendemail-validate b/contrib/sendemail-validate
index 8f0af2d5..76031115 100755
--- a/contrib/sendemail-validate
+++ b/contrib/sendemail-validate
@@ -35,7 +35,9 @@ validate_series () {
$make validate
}
-# main -------------------------------------------------------------------------
+# fallback for git 2.40 and older
+: ${GIT_SENDEMAIL_FILE_COUNTER:=1}
+: ${GIT_SENDEMAIL_FILE_TOTAL:=1}
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then