"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: reset committer name during rebase and histedit
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 23 Jul 2022 16:04:35 +0200

Download raw body.

Thread
On Sat, Jul 23, 2022 at 03:57:57PM +0200, Omar Polo wrote:
> the test_rebase_no_author_info fails if there is a ~/.gitconfig file.
> overriding HOME is not feasible, and providing an empty one in the repo
> is not ideal either because get_author() will fall back to the global
> config if the local one doesn't have a author defined (and if
> $GOT_AUTHOR is not defined.)
> 
> So, as discussed on irc add an undocumented env var,
> GOT_IGNORE_GITCONFIG for the tests.  only that this breaks the commit
> tests.  To work around that and to hopefully simplify future tests, diff
> belows moves some variable definition from the global scope into
> run_test: this way we can override them in functions without affecting
> the following tests in the same file.

I don't think we should make the tests more complicated for this reason.
Rather, we should change the tooling such that scripting it the way we
need to becomes as easy as possible.