]> git.99rst.org Git - git.git/commit
setup: drop static `cwd` variable
authorPatrick Steinhardt <redacted>
Tue, 7 Jul 2026 07:21:27 +0000 (09:21 +0200)
committerJunio C Hamano <redacted>
Tue, 7 Jul 2026 17:49:40 +0000 (10:49 -0700)
commit28f38f35a00f8f9de6358b1e5b32fc4f17de2f81
tree7a9b0910d50bf634dda8168ec803fc783915375f
parentb964ad1f019d66604d7577e2db49481461bcab5a
setup: drop static `cwd` variable

The current working directory is stored as part of a static strbuf
variable. This variable had to have a lifetime longer than its
containing function because the value we return typically points into
that buffer.

In the preceding commit we have moved the prefix into the repository
though. Consequently, we can now return the repository's prefix instead
of the local one and thus properly manage the lifecycle of this local
variable.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
setup.c
git clone https://git.99rst.org/PROJECT