Re: [PATCH 1/7] t1300: test "set all" mode with value_regex
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Nov 20, 2020, 02:09 UTC
- Message-ID
- <20201120020924.GF389879@camp.crustytoothpaste.net>
- In-Reply-To
- <xmqqo8jtvvby.fsf@gitster.c.googlers.com>
On 2020-11-19 at 22:24:33, Junio C Hamano wrote:
Show 19 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > +test_expect_success 'set all config with value_regex' ' > > + q_to_tab >initial <<-\EOF && > > + [abc] > > + Qkey = one > > + EOF > > + > > + cp initial .git/config && > > Not a new problem with this patch, but does the above pattern > introduce potential problems? I am wondering if overwriting the > config file with a little piece that has only the stuff the test is > interested in, while wiping the parts that may be essential for > repository integrity (e.g. "extensions.objectFormat"), is OK in the > long run (brian cc'ed for his sha256 work). There also are > autodetected crlf settings etc. that are in the .git/config when a > test repository is created, and we probably would want to keep them > intact.
I haven't looked at the code, but if you're just using git config in a test, then overwriting the config file shouldn't be a problem with SHA-256. If you're trying to read or write objects or the index, then that's definitely a problem, and you'll definitely notice exciting failures if you do that.
-- brian m. carlson (he/him or they/them) Houston, Texas, US