Re: [PATCH v6 0/6] repo info: add category/path keys and --path-format
- From
- Jialong Wang <jerrywang183@yahoo.com>
- Date
- Mar 18, 2026, 20:44 UTC
- Message-ID
- <20260318204438.40075-1-jerrywang183@yahoo.com>
- In-Reply-To
- <pull.2208.v6.git.git.1772428548.gitgitgadget@gmail.com>
Hi,
While reading the current `git repo info` implementation, I noticed that `layout.bare` is still implemented via `is_bare_repository()` in `builtin/repo.c`.
At first I thought this might be a small repository-awareness cleanup, since the `repo info` field callbacks already receive a `struct repository *`. But after tracing it further, it seems the current `is_bare_repository()` semantics are not equivalent to simply checking whether `repo_get_work_tree(repo)` is NULL.
So before trying to patch this, I wanted to confirm the intended direction:
- Should `repo info`'s `layout.bare` continue to follow the current `is_bare_repository()` semantics? - Or, if `git repo info` is meant to become more explicitly repository-aware over time, would it make sense to introduce something like a `repo_is_bare(repo)` helper and use that instead?
I am asking mainly to avoid sending a misleading cleanup patch for what may actually be a semantics question.
Thanks, Jialong