From: Mark C. Chu-Carroll Date: Thu, 15 Oct 2026 14:44:13 GMT Subject: Re: [PATCH v5 1/1] repo: add filtering options to "repo structure" Message-ID: In-Reply-To: On Wed Oct 14, 2026 at 8:15 AM EDT, Patrick Steinhardt wrote: > On Tue, Oct 13, 2026 at 01:28:51PM -0400, Mark C. Chu-Carroll wrote: >> index 84e012f83f..f45dea06d5 100644 >> --- a/builtin/repo.c >> +++ b/builtin/repo.c >> @@ -947,16 +953,20 @@ static int cmd_repo_structure(int argc, const char **argv, const char *prefix, >> OPT_END() > }; >> ... >> + if (argc > 1) >> + usage(_("too many arguments")); > > Nit: it's not "too many arguments", it's unrecognized arguments here as > the number of arguments can theoretically be unlimited. Copying patterns > from other builtins: > > argc = setup_revisions(argc, argv, &revs, NULL); > if (argc > 1) > return error(_("unrecognized argument: %s"), argv[1]); Right. I was just keeping the original error message; but since we're now taking a potentially unbounded list of rev args, that message no longer makes sense. >> diff --git a/t/t1901-repo-structure.sh b/t/t1901-repo-structure.sh >> index 02cc2b594a..1d25ee14e5 100755 >> --- a/t/t1901-repo-structure.sh >> +++ b/t/t1901-repo-structure.sh >> @@ -140,10 +140,208 @@ test_expect_success SHA1 'repository with references and objects' ' > [snip] > ... >> + test_must_be_empty err >> ) >> ' >> >> + >> test_expect_success SHA1 'lines and nul format' ' >> test_when_finished "rm -rf repo" && >> git init repo && > > There's a trailing newline being added here. Sorry. I've got some vision issues, and as a result, it's difficult for me to see whitespace - one space or one newline versus two is pretty much invisible for me. >> @@ -186,13 +384,13 @@ test_expect_success SHA1 'lines and nul format' ' > > I'd drop these while-at-it changes. If you want to include them they > should be part of a preparatory commit. Will drop. My reflex is to change all instances of something after a comment like this. -Mark -- Mark Craig Chu-Carroll (@MarkChuCarroll at gitlab) *** Software Tools/Math Geek - Software Engineer at Gitlab *** Work Email: mcarroll@gitlab.com / markchucarroll@fastmail.com *** Personal Blog: http://goodmath.org/blog / Personal email: markcc@gmail.com