{"thread":{"id":"65188","subject":"[PATCH] t1900: add tests for git repo structure subcommand","startedAt":"2026-03-10T03:09:22Z","lastAt":"2026-03-10T13:35:00Z","messageCount":3,"participants":["Mansi Singh via GitGitGadget","Junio C Hamano","K Jayatheerth"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"538350","messageId":"pull.2066.git.1773112159662.gitgitgadget@gmail.com","threadId":"65188","inReplyTo":null,"subject":"[PATCH] t1900: add tests for git repo structure subcommand","fromName":"Mansi Singh via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-03-10T03:09:19Z","receivedAt":"2026-03-10T03:09:22Z","isPatch":true,"sender":{"key":"mansimaanu8627@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40687671?v=4"},"body":"From: Mansi Singh <mansimaanu8627@gmail.com>\n\nThe t1900 test file covers git repo info thoroughly but has\nno tests for the git repo structure subcommand. Add basic\ntests to verify that:\n\n- git repo structure succeeds and produces no stderr output\n- git repo structure --format=keyvalue outputs expected keys\n- git repo structure --format=nul succeeds\n- git repo structure rejects an unknown format\n\nSigned-off-by: Mansi Singh <mansimaanu8627@gmail.com>\n---\n    t1900: add tests for git repo structure subcommand\n    \n    Add tests for the git repo structure subcommand in t1900-repo-info.sh.\n    The tests verify that git repo structure outputs the expected fields\n    (commits, trees, blobs, tags) in both default and key-value formats.\n    \n    Signed-off-by: Mansi Singh mansimaanu8627@gmail.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2066%2FMansiSingh17%2Frepo-add-structure-tests-v3-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2066/MansiSingh17/repo-add-structure-tests-v3-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2066\n\n t/t1900-repo-info.sh | 22 ++++++++++++++++++++++\n 1 file changed, 22 insertions(+)\n\ndiff --git a/t/t1900-repo-info.sh b/t/t1900-repo-info.sh\nindex a9eb07abe8..b63d404075 100755\n--- a/t/t1900-repo-info.sh\n+++ b/t/t1900-repo-info.sh\n@@ -149,4 +149,26 @@ test_expect_success 'git repo info --keys uses lines as its default output forma\n \ttest_cmp expect actual\n '\n \n+\n+test_expect_success 'git repo structure succeeds' '\n+\tgit repo structure >actual 2>stderr &&\n+\ttest_must_be_empty stderr\n+'\n+\n+test_expect_success 'git repo structure --format=lines succeeds' '\n+\tgit repo structure --format=lines >actual &&\n+\tgrep \"references.branches.count=\" actual &&\n+\tgrep \"objects.commits.count=\" actual\n+'\n+\n+test_expect_success 'git repo structure --format=nul succeeds' '\n+\tgit repo structure --format=nul >actual\n+'\n+\n+test_expect_success 'git repo structure rejects unknown format' '\n+\techo \"fatal: invalid format ${SQ}foo${SQ}\" >expect &&\n+\ttest_must_fail git repo structure --format=foo 2>actual &&\n+\ttest_cmp expect actual\n+'\n+\n test_done\n\nbase-commit: d181b9354cf85b44455ce3ca9e6af0b9559e0ae2\n-- \ngitgitgadget\n"},{"id":"538352","messageId":"xmqqsea8xsov.fsf@gitster.g","threadId":"65188","inReplyTo":"pull.2066.git.1773112159662.gitgitgadget@gmail.com","subject":"Re: [PATCH] t1900: add tests for git repo structure subcommand","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-10T03:35:28Z","receivedAt":"2026-03-10T03:35:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Mansi Singh via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Mansi Singh <mansimaanu8627@gmail.com>\n>\n> The t1900 test file covers git repo info thoroughly but has\n> no tests for the git repo structure subcommand. Add basic\n> tests to verify that:\n>\n> - git repo structure succeeds and produces no stderr output\n> - git repo structure --format=keyvalue outputs expected keys\n> - git repo structure --format=nul succeeds\n> - git repo structure rejects an unknown format\n\nAsk those who have worked on the relevant command to review by\nadding them on the Cc: line.\n\n\n"},{"id":"538436","messageId":"20260310133435.42995-1-jayatheerthkulkarni2005@gmail.com","threadId":"65188","inReplyTo":"pull.2066.git.1773112159662.gitgitgadget@gmail.com","subject":"Re: [PATCH] t1900: add tests for git repo structure subcommand","fromName":"K Jayatheerth","fromEmail":"jayatheerthkulkarni2005@gmail.com","sentAt":"2026-03-10T13:34:35Z","receivedAt":"2026-03-10T13:35:00Z","isPatch":true,"sender":{"key":"jayatheerthkulkarni2005@gmail.com","avatar":"https://avatars.githubusercontent.com/u/148841023?v=4"},"body":"> From: Mansi Singh <mansimaanu8627@gmail.com>\n> \n> The t1900 test file covers git repo info thoroughly but has\n> no tests for the git repo structure subcommand. Add basic\n> tests to verify that:\n> \n> - git repo structure succeeds and produces no stderr output\n> - git repo structure --format=keyvalue outputs expected keys\n> - git repo structure --format=nul succeeds\n> - git repo structure rejects an unknown format\n> \n> Signed-off-by: Mansi Singh <mansimaanu8627@gmail.com>\n> ---\n>     t1900: add tests for git repo structure subcommand\n> \n>     Add tests for the git repo structure subcommand in t1900-repo-info.sh.\n>     The tests verify that git repo structure outputs the expected fields\n>     (commits, trees, blobs, tags) in both default and key-value formats.\n> \n>     Signed-off-by: Mansi Singh mansimaanu8627@gmail.com\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2066%2FMansiSingh17%2Frepo-add-structure-tests-v3-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2066/MansiSingh17/repo-add-structure-tests-v3-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2066\n> \n>  t/t1900-repo-info.sh | 22 ++++++++++++++++++++++\n>  1 file changed, 22 insertions(+)\n> \n\n\nHi,\n\nThe very next file in t/\ni.e t1901.. is about repo structure\n\nYou might wanna check that out\nbecause I find most of these to be redundant\n\nRegards\n- Jayatheerth\n"}]}