]> git.99rst.org Git - git.git/commit
path: extract format_path() and use in rev-parse
authorK Jayatheerth <redacted>
Wed, 24 Jun 2026 03:37:46 +0000 (09:07 +0530)
committerJunio C Hamano <redacted>
Wed, 24 Jun 2026 04:15:52 +0000 (21:15 -0700)
commit60cafea9078097f051f39c234fb6aa8f6051b2bd
treed0370614fdf012ab6d323f6175adcd64188ddad5
parent1666c1265231b0bc5f613fbbf3f0a9896cdef76e
path: extract format_path() and use in rev-parse

Path formatting logic in builtin/rev-parse.c writes directly to
stdout. Other builtins cannot reuse it.

Extract this logic into format_path() in path.c and expose
a path_format enum in path.h.

Convert rev-parse to use the new helper in the same step to validate
the API against existing tests and avoid introducing dead code.

Mentored-by: Justin Tobler <redacted>
Mentored-by: Lucas Seiki Oshiro <redacted>
Signed-off-by: K Jayatheerth <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/rev-parse.c
path.c
path.h
git clone https://git.99rst.org/PROJECT