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>