Subject: Re: [PATCH] Several tests: cd inside subshell instead of around

From: Jonathan Nieder <[email-masked]>
Date: Tue, 7 Sep 2010 00:19:22 -0500

Junio C Hamano wrote:
> Jonathan Nieder <[email-masked]> writes:

>> I like it.  Affected test scripts:
>> ... (many) ...
>> and probably some others.
>
> For the record, I _do not_ like it at all.  Is it worth being that
> draconian and say each test must start at $TRASH?  What do we gain by it?

To clarify, what I meant was something like "I like it, but reality
does not seem to permit it now".

> After we vet and apply Jens and your "turn 'cd there && do this && cd ..'
> into a subshell" series, and the "modernize indentation style" series,
> perhaps we should stop and think?  In an ideal world, it would be really
> nice if each "test_expect_success/failure" in a single script were
> independent from each other (if we did so, GIT_SKIP_TESTS=4321.4 starts to
> be more useful), but realistically, I don't think it is worth the effort.

Ah, our emails crossed.  I would rather that tests that affect the
state be marked as such, nothing more.  The "always return to $TRASH"
rule is a lot stronger than that, unfortunately.  What I really liked
about your suggestion is that the "tests must start and end in $TRASH"
rule could be checked with very little effort.  Unfortunately, as the
list of scripts illustrates, that rule doesn't describe what our
current tests do.