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>
---
contrib/sendemail-validate | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/sendemail-validate b/contrib/sendemail-validate
index 8f0af2d54ad0..7603111573dc 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
--
2.44.0
On Sun Mar 10, 2024 at 17:35, Robin Jarry <robin@jarry.cc> wrote:
> 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>> ---> contrib/sendemail-validate | 4 +++-> 1 file changed, 3 insertions(+), 1 deletion(-)>> diff --git a/contrib/sendemail-validate b/contrib/sendemail-validate> index 8f0af2d54ad0..7603111573dc 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
LGTM
Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
--
+36305425054
bence.ferdinandy.com
Bence Ferdinandy, Apr 13, 2024 at 22:03:
>> On Sun Mar 10, 2024 at 17:35, Robin Jarry <robin@jarry.cc> wrote:> > 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>> > ---> > contrib/sendemail-validate | 4 +++-> > 1 file changed, 3 insertions(+), 1 deletion(-)> >> > diff --git a/contrib/sendemail-validate b/contrib/sendemail-validate> > index 8f0af2d54ad0..7603111573dc 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>> LGTM>> Reviewed-by: Bence Ferdinandy <bence@ferdinandy.com>
Applied. Thanks!