mirror of
https://github.com/git-for-windows/git.git
synced 2026-06-16 13:04:57 -05:00
The path-formatting logic in builtin/rev-parse.c is tightly coupled to that command and writes directly to stdout, making it impossible for other builtins to reuse. Extract the core algorithm into append_formatted_path() in path.c and expose a path_format enum in path.h so that any builtin can format paths consistently without duplicating logic. Mentored-by: Justin Tobler <jltobler@gmail.com> Mentored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
41 KiB
41 KiB