From: K Jayatheerth Date: Wed, 10 Jun 2026 12:11:35 GMT Subject: Re: [GSoC PATCH v2 3/4] repo: add path.gitdir with absolute and relative suffix formatting Message-ID: In-Reply-To: > > Intercepting PATH_FORMAT_DEFAULT in print_path() and overriding it to > the appropriate default needed for the specific path printed by > git-rev-parse(1), as shown above, seems reasonable to me. > > But I do think that PATH_FORMAT_DEFAULT should have an actual default in > format_path(). Otherwise we would have an enum value that requires > callers to explicitly handle prior to invoking format_path() which would > also be rather awkward. IMO, it probably wouldn't be a big deal to just > say PATH_FORMAT_DEFAULT is treated as PATH_FORMAT_UNMODIFIED when passed > to format_path() and document it. In practice, our rev-parse use-case > would always replace PATH_FORMAT_DEFAULT with the appropriate value > prior to invoking format_path(). > Makes sense. I'll have format_path() treat PATH_FORMAT_DEFAULT as PATH_FORMAT_UNMODIFIED internally and document it, so there's no unhandled enum value. print_path() in rev-parse will still intercept PATH_FORMAT_DEFAULT and replace it with the path-specific default before calling format_path(), so in practice it won't fall through to the unmodified behavior. Almost done with v3 this was the only one left. Thanks for taking time!