]> git.ipfire.org Git - thirdparty/git.git/commit
environment: make `get_git_namespace()` self-contained
authorPatrick Steinhardt <ps@pks.im>
Thu, 12 Sep 2024 11:29:51 +0000 (13:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Sep 2024 17:15:41 +0000 (10:15 -0700)
commitc22d183b01417f996307de0c3923811b66a44ae7
treecad79c4762a5e0e28d1e96e0938136f65976da58
parent26b4df907bca4829df44dc7eee23ccf7720898f7
environment: make `get_git_namespace()` self-contained

The logic to set up and retrieve `git_namespace` is distributed across
different functions which communicate with each other via a global
environment variable. This is rather pointless though, as the value is
always derived from an environment variable, and this environment
variable does not change after we have parsed global options.

Convert the function to be fully self-contained such that it lazily
populates once called.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c