From: jayesh0104 <jayeshdaga99@gmail.com>
To: git@vger.kernel.org
Cc: Jayesh Daga <jayeshdaga99@gmail.com>,
gitster@pobox.com, karthik.188@gmail.com, jltobler@gmail.com,
ayu.chandekar@gmail.com, siddharthasthana31@gmail.com
Subject: [RFC] repo: path representation in `git repo info` (absolute vs relative)
Date: Wed, 18 Mar 2026 06:55:03 +0000 [thread overview]
Message-ID: <20260318065545.10001-3-jayeshdaga99@gmail.com> (raw)
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
reply other threads:[~2026-03-18 7:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318065545.10001-3-jayeshdaga99@gmail.com \
--to=jayeshdaga99@gmail.com \
--cc=ayu.chandekar@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jltobler@gmail.com \
--cc=karthik.188@gmail.com \
--cc=siddharthasthana31@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.