summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-16 12:44:57 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-16 09:46:24 -0700
commita70a9bf6eec832b808a805de318601684b19f18e (patch)
treeaca5b36515a0cf6fc94eec7e2cdf6573fb29f6dd /diff-lib.c
parent25673b1c476756ec0587fb0596ab3c22b96dc52a (diff)
config: fix constness of out parameter for `git_config_get_expiry()`
The type of the out parameter of `git_config_get_expiry()` is a pointer to a constant string, which creates the impression that ownership of the returned data wasn't transferred to the caller. This isn't true though and thus quite misleading. Adapt the parameter to be of type `char **` and adjust callers accordingly. While at it, refactor `get_shared_index_expire_date()` to drop the static `shared_index_expire` variable. It is only used in that function, and furthermore we would only hit the code where we parse the expiry date a single time because we already use a static `prepared` variable to track whether we did parse it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
0 files changed, 0 insertions, 0 deletions