Thread (38 messages) 38 messages, 5 authors, 2021-08-30

Re: [PATCH v2 5/5] commit-graph: show usage on "commit-graph [write|verify] garbage"

flat view

From: Taylor Blau <hidden>
Date: 2021-07-19 17:09:16

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help