Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Wed, Dec 09 2020, Jeff King wrote:
...
quoted
+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 [ref].
We really should document that <envvar> 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.