public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] repo: path representation in `git repo info` (absolute vs relative)
@ 2026-03-18  6:55 jayesh0104
  0 siblings, 0 replies; only message in thread
From: jayesh0104 @ 2026-03-18  6:55 UTC (permalink / raw)
  To: git
  Cc: Jayesh Daga, gitster, karthik.188, jltobler, ayu.chandekar,
	siddharthasthana31

From: Jayesh Daga <jayeshdaga99@gmail.com>

Hi,

While working on extending `git repo info` to include additional
path-related values (e.g., `paths.common_dir`, `paths.toplevel`,
and `--git-path` equivalents), I wanted to clarify the expected
representation of paths before proceeding further.

Currently, commands like `git rev-parse` may return paths relative
to the current working directory depending on context. In contrast,
some internal APIs operate on absolute paths.

This raises a design question for `git repo info`:

  Should path-related values be returned as:
  1. Relative paths (consistent with `rev-parse` behavior and more portable), or
  2. Absolute paths (more explicit and unambiguous)?

One possible approach is:
  - Default to relative paths for consistency and portability
  - Provide an optional flag (e.g., `--absolute`) to return absolute paths

This would allow flexibility while maintaining compatibility with
existing expectations.

I would appreciate feedback on the preferred approach before
proceeding with additional path-related keys.

Thanks,
Jayesh

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-18  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18  6:55 [RFC] repo: path representation in `git repo info` (absolute vs relative) jayesh0104

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox