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

Re: [PATCH] t7300: fix broken && chains

From
erik elfström <erik.elfstrom@gmail.com>
Date
Sep 1, 2015, 06:27 UTC
Message-ID
<CAMpP7NZ=K62XVkuuJHpDruBy7b2gECHrJ30L43LzdE54vTVB2A@mail.gmail.com>
In-Reply-To
<20150831185414.GB20555@sigill.intra.peff.net>
On Mon, Aug 31, 2015 at 8:54 PM, Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> On Sun, Aug 30, 2015 at 11:18:09AM +0200, Erik Elfström wrote:
>
> Unfortunately CHAIN_LINT cannot reach inside a nested subshell. I cannot
> think of a way to make it do so, and besides, that is also the way to
> override the &&-chain precedence. So I think it is not really possible
> to get better coverage here. And such cases as these are not really very
> interesting (e.g., here we exclude only minor minor setup steps from the
> &&-chain).
>
> -Peff

I actually hacked together an ugly script to check for more broken chains. It's not working very well and I haven't checked the output thoroughly but I did see quite a few broken chains. Many are of the (mostly harmless) form:

     (
        echo "100644 $o5 0    a"
        echo "100644 $o0 0    c"
        echo "160000 $c1 0    d"
    ) >expected &&

I'd estimate that there are hundreds of these (see t3030 for examples). I'm not sure if you care about these? As you say they are not really very interesting cases.

/Erik
Previous: Jeff KingNext: Jeff King
Message 6 of 7 in “t7300: fix broken && chains”
  1. t7300: fix broken && chainsErik Elfström, Aug 30, 2015
  2. Junio C HamanoAug 31, 2015
  3. erik elfströmSep 1, 2015
  4. Junio C HamanoSep 1, 2015
  5. Jeff KingAug 31, 2015
  6. erik elfströmSep 1, 2015
  7. Jeff KingSep 1, 2015

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.