From: Lucas Seiki Oshiro Date: Sun, 01 Mar 2026 19:40:09 GMT Subject: Re: [PATCH 0/4] repo: add support for path-related fields Message-ID: <491CD222-D595-4408-B78C-72E4C3DA0A62@gmail.com> In-Reply-To: > Hi Lucas Hi, Phillip! > How does this effort relate to similar effort at at > https://lore.kernel.org/pull.2208.v5.git.git.1772220640.gitgitgadget@gmail.com ? I have this patch series started since July, but I could only send this after having my two previous changes in git-repo-info accepted. I think that patch series you mentioned is based on some previous message (or the GSoC project ideas) where I listed what was still need to be implemented. It uses a similar --path-format flag, but without dealing with the multiple possibilities currently used by git-rev-parse (see [1]). The original print_path from git-rev-parse has four possible default formats (relative, relative if there's a shared root, canonical (absolute), and unmodified), and we can force it to use the relative or absolute formats. If I understood it correctly, this complex logic was added ([1]) to allow the user to force one of these two formats without breaking the default behavior. Since git-repo-info is a new command, we are free from being compatible with that, and perhaps this doesn't make sense. Since there are many people interested in contributing to git-repo-info, especially in the path-* fields, I just wanted to finish what I have here and leave the rest for them :-) >> 1. Add --path-format, just like we have in git-rev-parse > > I think that's the best solution. Having different defaults > for different paths like rev-parse is confusing and having > different keys for absolute and relative versions of the > same path gets rather verbose. I agree, but I still think that it feels weird that we won't be able return absolute and relative paths in a single git-repo-info call. But it also won't cost too much to call it twice. > Thanks Thanks, Phillip! Phillip PS: I'm also CC'ing: - Eslam (the author of the patch mentioned by Phillip) - Karthik, Justin, Ayush, and Siddhart (possible mentors for "Improve the new git repo command") - Patrick, who was my GSoC mentor and the person I first discussed with about --path-format [1] fac60b8925 (rev-parse: add option for absolute or relative path formatting, 2020-12-13)