On Wed Nov 18, 2026 at 5:28 PM EST, Junio C Hamano wrote:
> "Mark C. Chu-Carroll" <mark…@fastmail.com> writes: >
>> The current implementation of "git repo stucture" provides summary >> information about everything in the repository - all of the
> ... >
>> + argc = parse_options(argc, argv, prefix, options, repo_structure_usage, >> + PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN_OPT);
> > Are we willing to lose "--" from the command line? For example, to > count only the commits that touch things under the t/ directory > between master and grobble:
You're right - I didn't consider that.
> > git repo stucture master..grobble -- t/ > > might be useful, but without PARSE_OPT_KEEP_DASHDASH, wouldn't you > lose "--"? If there are directories or files that happen to have > the same name as an existing revision, the users would need to be > able to disambiguate them with "--". >
>> if (show_progress < 0) >> show_progress = isatty(2); >> >> + repo_init_revisions(repo, &revs, prefix); >> + if (argc > 1) { >> + argc = setup_revisions(argc, argv, &revs, NULL); >> + included_revision_args = true;
> > Things like > > git repo stucture --objects > git repo stucture --stdin > git repo stucture --end-of-options > > would still count as (argc > 1) and cause setup_revisions() to be > called, but we still have not received any positive (or negative) > revision to start traversing. Should not included_revision_args be > initialized based on revs.rev_input_given or something?
Good catch.
>> + if (argc > 1) >> + return error(_("unrecognized argument: %s"), argv[1]);
> > This leaks revs and resources held by it because release_revisions() > has not been called on it, which may not matter all that much as we > will exit soon.
I was assuming that the full release of everything on termination took care of cleanup, but I'm happy to add it explicitly. Thanks, -Mark
-- Mark Craig Chu-Carroll (@MarkChuCarroll at gitlab) *** Software Tools/Math Geek - Software Engineer at Gitlab *** Work Email: mcar…@gitlab.com / mark…@fastmail.com *** Personal Blog: http://goodmath.org/blog / Personal email: mark…@gmail.com