Re: [PATCH] send-email: export patch counters in validate environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Wood, Apr 11, 2023 at 15:23:
> This is certainly less intrusive, if it does what you need and is 
> efficient enough for your needs then I'd be inclined to go with this 
> approach.

Yes, that is perfectly suitable to validate series. The missing pieces
of information (e.g. the place where all patches are spooled) can be
either hard coded or stored in git config entries.

> >   	foreach my $f (@files) {
> >   		unless (-p $f) {
> > +			$ENV{GIT_SENDEMAIL_PATCH_COUNTER} = "$num";
> > +			$ENV{GIT_SENDEMAIL_PATCH_TOTAL} = "$num_patches";
>
> We only need to set this once outside the loop
>
> >   			validate_patch($f, $target_xfer_encoding);
> > +			delete $ENV{GIT_SENDEMAIL_PATCH_COUNTER};
> > +			delete $ENV{GIT_SENDEMAIL_PATCH_TOTAL};
>
> Do we really need to clear these? Certainly not in each iteration of the 
> loop I would think.

I wanted to keep everything collocated. The time spent setting/unsetting
these variables is completely negligible. I don't mind making this more
streamlined in a v2.

Thanks for the review :)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux