Re: [PATCH 1/6] CodingGuidelines: describe "export VAR=VAL" rule

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

 



On Apr 06 2024, Eric Sunshine wrote:

> On Fri, Apr 5, 2024 at 8:09 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> https://lore.kernel.org/git/201307081121.22769.tboegi@xxxxxx/
>> resulted in 9968ffff (test-lint: detect 'export FOO=bar',
>> 2013-07-08) to add a rule to t/check-non-portable-shell.pl script to
>> reject
>>
>>         export VAR=VAL
>>
>> and suggest us to instead write it as "export VAR" followed by
>> "VAR=VAL".  This however was not spelled out in the CodingGuidelines
>> document.
>
> I suspect you meant:
>
>    ... and suggest us to instead write it as "VAR=VAL" followed by
>    "export VAR".

There is no difference between them.  The export command only marks the
variable for export, independent of the current or future value of the
variable.  The exported value is always the last assigned one.

-- 
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




[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