Re: [PATCH 2/3] t0033-safe-directory: check when 'safe.directory' is ignored
- From
Taylor Blau <me@ttaylorr.com>
- Date
- May 10, 2022, 19:55 UTC
- Message-ID
- <YnrDK0wCV6taY1QX@nand.local>
- In-Reply-To
- <20220510183321.GA4408@szeder.dev>
On Tue, May 10, 2022 at 08:33:21PM +0200, SZEDER Gábor wrote:
Show 21 quoted lines
> On Fri, Apr 29, 2022 at 03:19:01PM -0400, Derrick Stolee wrote: > > > And we do need a subshell to set the > > > config, because without unsetting GIT_TEST_ASSUME_DIFFERENT_OWNER 'git > > > config' would refuse to touch the config file. > > > > Ah yes, of course. > > > > > I think something like > > > > > > test_when_finished "( > > > unset GIT_TEST_ASSUME_DIFFERENT_USER && > > > git config --unset safe.directory > > > )" > > > > > > would work, though. > > > > Would it be simpler to use this? > > > > GIT_TEST_ASSUME_DIFFERENT_USER=0 git config --unset safe.directory > > Oh, wow. This is so obvious, no wonder it didn't occur to me :)
Don't we consider this one-shot environment variable to be sticky on some shells (i.e., that it persists beyond just the "git config" invocation here)?
Thanks, Taylor