git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] test: fix for COLUMNS and bash 5

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 23, 2021, 12:59 UTC
Message-ID
<87sfz0fh8o.fsf@evledraar.gmail.com>
In-Reply-To
<xmqqmtpuik5m.fsf@gitster.g>
On Fri, Aug 06 2021, Junio C Hamano wrote:
Show 25 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> writes:
>
>>> @@ -419,6 +419,12 @@ COLUMNS=80
>>
>> COLUMNS is set just before the start of the hunk context ...
>>
>>>  export LANG LC_ALL PAGER TZ COLUMNS
>>>  EDITOR=:
>>
>> ... so these two "commands" above are executed while COLUMNS is
>> already set but checkwinsize is not yet disabled.  The reason I put
>> quotes around that commands is that while exporting and setting
>> variables are indeed commands as defined in the POSIX Shell Command
>> Language specs, Bash with checkwinsize enabled only "checks the window
>> size after each extern (non-builtin) command" (quoting 'man bash').
>>
>> So even though it is safe to execute these variable setting and
>> exporting commands after setting COLUMNS but disabling checkwinsize, I
>> think it would be prudent to disable checkwinsize before initializing
>> COLUMNS.  (And perhaps adding "non-builtin" to the comment below.)
>
> OK.  I tend to agree that a less invasive solution like this is
> preferred over adding new code to only help tests in the everyday
> binary, especially this close to the final.  Taking the above, I'd
> queue this and hopefully I can merge it by -rc2 at the latest.
Now that we're post-release are you interested in a re-roll of
https://lore.kernel.org/git/cover-v3-0.3-00000000000-20210804T230335Z-avarab@gmail.com/
+ removal of the bash-specific checkwinsize added here, or would you
like to just keep Felipe's version which you integrated as 390b44eb2bc
(test: fix for COLUMNS and bash 5, 2021-08-05).

Either works for me, just poking to see whether I should drop this from my local TODO list or not...

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 9 in “test: fix for COLUMNS and bash 5”
  1. test: fix for COLUMNS and bash 5Felipe Contreras, Aug 5, 2021
  2. Ævar Arnfjörð BjarmasonAug 5, 2021
  3. Felipe ContrerasAug 6, 2021
  4. SZEDER GáborAug 6, 2021
  5. Junio C HamanoAug 6, 2021
  6. Ævar Arnfjörð BjarmasonAug 23, 2021
  7. Junio C HamanoAug 23, 2021
  8. test: fix for COLUMNS and bash 5Felipe Contreras, Aug 6, 2021
  9. ZheNing HuAug 7, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.