On Sun, Jul 18, 2021 at 09:58:09AM +0200, Ævar Arnfjörð Bjarmason wrote:
Change the parse_options() invocation in the commit-graph code to make
sense. We're calling it twice, once for common options parsing, and
then for the sub-commands.
But we never checked if we had something leftover in argc in "write"
or "verify", as a result we'd silently accept garbage in these
subcommands. Let's not do that.
All makes sense and looks good to me. One small note below:
quoted hunk ↗ jump to hunk
test_expect_success 'usage' '
test_expect_code 129 git commit-graph -h 2>err &&
- ! grep error: err
+ ! grep error: err &&
Ah, now I see why you added this test back in the first patch. I still
think that we should get rid of the first two lines, but...
+ test_expect_code 129 git commit-graph write blah &&
+ test_expect_code 129 git commit-graph write verify
Keeping these makes sense.
Thanks,
Taylor