From: Junio C Hamano Date: Thu, 10 Dec 2020 21:49:28 GMT Subject: Re: [PATCH 3/3] config: store "git -c" variables using more robust format Message-ID: In-Reply-To: <87pn3hwfd5.fsf@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: > On Wed, Dec 09 2020, Jeff King wrote: > ... >> +test_expect_success '--config-env handles keys with equals' ' >> + echo value=with=equals >expect && >> + ENVVAR=value=with=equals git \ >> + --config-env=section.subsection=with=equals.key=ENVVAR \ >> + config section.subsection=with=equals.key >actual && >> + test_cmp expect actual >> +' >> + > > Maybe worth adding a test for the strrchr() semantics here with: > > perl -we '$ENV{"Y=Z"}="why and zed"; system "Z=zed git --config-env=X=Y=Z ..."' > > Which would show that we can't look up "Y=Z", but will always get "Z". Yes, that was explained in the cover letter of these three patches in . We really should document that can't contain an "=" sign, but I do not see much point in casting that limitation in stone with a test. As long as we know things work correctly with environment variables without '=' in their names, we should be happy.