From: Eslam reda ragheb via GitGitGadget Date: Mon, 02 Mar 2026 05:15:47 GMT Subject: [PATCH v6 5/6] t1900: cover repo info path keys and path-format Message-ID: <1e52e7bd7f124481910d455da388c75636b5cb38.1772428548.git.gitgitgadget@gmail.com> In-Reply-To: From: Eslam reda ragheb Extend t1900 to validate category-key expansion, path.* key behavior, and --path-format handling for git repo info. The tests compare repo info output to equivalent rev-parse values. This ensures behavior remains aligned with existing plumbing semantics. Also keep mixed key/category ordering coverage so callers can rely on deterministic output order when combining explicit keys with category requests. Signed-off-by: Eslam reda ragheb --- t/t1900-repo.sh | 194 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) diff --git a/t/t1900-repo.sh b/t/t1900-repo.sh index a9eb07abe8..6605394d1f 100755 --- a/t/t1900-repo.sh +++ b/t/t1900-repo.sh @@ -4,6 +4,40 @@ test_description='test git repo-info' . ./test-lib.sh +# git-repo-info keys. It must contain the same keys listed in the const +# repo_info_fields, in lexicographical order. +REPO_INFO_KEYS=' + layout.bare + layout.shallow + object.format + path.common-dir + path.config-file + path.git-dir + path.grafts-file + path.hooks-directory + path.index-file + path.objects-directory + path.prefix + path.superproject-working-tree + path.toplevel + path.working-tree + references.format +' + +REPO_INFO_PATH_KEYS=' + path.common-dir + path.config-file + path.git-dir + path.grafts-file + path.hooks-directory + path.index-file + path.objects-directory + path.prefix + path.superproject-working-tree + path.toplevel + path.working-tree +' + # Test whether a key-value pair is correctly returned # # Usage: test_repo_info