]> git.ipfire.org Git - thirdparty/git.git/commit
rerere: let `rerere_path()` write paths into a caller-provided buffer
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Feb 2025 11:03:36 +0000 (12:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Feb 2025 21:54:11 +0000 (13:54 -0800)
commit8ee018d863e521f32a9cb92db66c25e848b5e0d0
tree440dd796327f2cb8450e130df6950153d66514b3
parent07242c2a5afb2a633feb110b1aa74e2adcc37575
rerere: let `rerere_path()` write paths into a caller-provided buffer

Same as with `get_worktree_git_dir()` a couple of commits ago, the
`rerere_path()` function returns paths that need not be free'd by the
caller because `git_path()` internally uses `get_pathname()`.

Refactor the function to instead accept a caller-provided buffer that
the path will be written into, passing on ownership to the caller. This
refactoring prepares us for the removal of `git_path()`.

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