]> git.ipfire.org Git - thirdparty/git.git/commit - environment.c
environment: make `getenv_safe()` a public function
authorPatrick Steinhardt <ps@pks.im>
Tue, 12 Jan 2021 12:27:10 +0000 (13:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2021 21:03:45 +0000 (13:03 -0800)
commitb9d147fb150c5e0960bc43ad5f3f843487f816f7
tree0f5186d384a95ed361a66afcb0940e784bde42ab
parent1ff21c05ba99ed2d0ade8318e3cb0c1a3f8d4b80
environment: make `getenv_safe()` a public function

The `getenv_safe()` helper function helps to safely retrieve multiple
environment values without the need to depend on platform-specific
behaviour for the return value's lifetime. We'll make use of this
function in a following patch, so let's make it available by making it
non-static and adding a declaration.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
environment.h [new file with mode: 0644]