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

Re: [PATCH] t5582: remove spurious 'cd "$D"' line

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2021, 21:10 UTC
Message-ID
<xmqqv93umtw7.fsf@gitster.g>
In-Reply-To
<20210824185942.GE2257957@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 26 quoted lines
> On Mon, Aug 23, 2021 at 04:32:39PM -0700, Junio C Hamano wrote:
>> Mickey Endito <mickey.endito.2323@protonmail.com> writes:
>> 
>> > The variable D is never defined in test t5582, more severely the test
>> > fails if D is defined by something outside the test suite, so remove
>> > this spurious line.
>> 
>> Wow.  Well spotted.
>> 
>> When D is left unset, we end up executing
>> 
>> 	cd "" && ...
>> 
>> and it explains why nobody noticed the breakage for nearly a year
>> since c0192df6 (refspec: add support for negative refspecs,
>> 2020-09-30) was written.
>> 
>> 
>> Unlike the apparent
>> copy-and-paste source, this is a more modern script that limits the
>> chdir inside subshells to avoid moving around in the main flow of
>> the test, and the fix proposed here looks the most sensible.  
>
> 'grep " cd $" test-results/*.out' shows that there is a similar case
> in 't5323-pack-redundant.sh' as well, in test 'master: pack-redundant
> works with no packfile'.

OK. A candidate for a separate patch, which would be a low-hanging fruit, I guess.

Previous: SZEDER GáborNext: Jeff King
Message 4 of 10 in “t5582: remove spurious 'cd "$D"' line”
  1. t5582: remove spurious 'cd "$D"' lineMickey Endito, Aug 23, 2021
  2. Junio C HamanoAug 23, 2021
  3. SZEDER GáborAug 24, 2021
  4. Junio C HamanoAug 24, 2021
  5. Jeff KingAug 25, 2021
  6. Junio C HamanoAug 25, 2021
  7. SZEDER GáborAug 28, 2021
  8. Junio C HamanoAug 30, 2021
  9. Jeff KingAug 30, 2021
  10. Junio C HamanoAug 30, 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.