From: Jialong Wang Date: Wed, 18 Mar 2026 20:44:38 GMT Subject: Re: [PATCH v6 0/6] repo info: add category/path keys and --path-format Message-ID: <20260318204438.40075-1-jerrywang183@yahoo.com> In-Reply-To: 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