git: support separate arg for `--config-env`'s value
commitc331551ccf9a4c8922ff5d2987eed9e218479000
authorPatrick Steinhardt <ps@pks.im>
Thu, 29 Apr 2021 12:55:34 +0000 (29 14:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Apr 2021 00:46:53 +0000 (30 09:46 +0900)
tree5a629d63d2470957f4915d413b8da85f68775286
parent9152904c1162afaf9ce0305d1988d1450dc80da7
git: support separate arg for `--config-env`'s value

While not documented as such, many of the top-level options like
`--git-dir` and `--work-tree` support two syntaxes: they accept both an
equals sign between option and its value, and they do support option and
value as two separate arguments. The recently added `--config-env`
option only supports the syntax with an equals sign.

Mitigate this inconsistency by accepting both syntaxes and add tests to
verify both work.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c
t/t1300-config.sh