On Wed, Mar 25, 2015 at 03:53:52AM +0100, SZEDER Gábor wrote:

> >     cmd1 &&
> >     for i in a b c; do
> >          cmd2 $i
> >     done &&
> >     cmd3
> >
> >   which will not notice failures of "cmd2 a" or "cmd b"
> 
> s/cmd b/cmd2 b/ ?

Yes, but the patches are already in next, so it is sadly too late for
commit message fixups.

> > - it cannot find a missing &&-chain inside a block or
> >   subfunction, like:
> [...]
> And inside subshells. [...]

Yeah, I had mentally filed them with "block", but true subshells are
probably the most common place. However, I'd suspect a good portion of
them are going to be the "trivial" type, especially if they involve
setting up the sub-environment at the top of the subshell. E.g.,
something like this:

  cmd1 &&
  (
    FOO=bar; export FOO
    cmd2
  ) &&
  cmd3

does not break the outer chain (which is what --chain-lint checks). It
does break the chain inside the subshell, but we never expect variable
assignment or export to fail (it is nice to fix it, of course, but the
main purpose in fixing the ones in my "trivial" patch was more about
shutting up --chain-lint to make the real breakages more obvious).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to