From: Tanga Joris Date: Sun, 08 Nov 2026 22:28:21 GMT Subject: Re: [PATCH] credential: parse subcommands with OPT_SUBCOMMAND Message-ID: In-Reply-To: <20261104202228.24642-1-edsonwasswa54@gmail.com> Hi Edson, Thanks for working on this, nice work adding subcommands completion for "git credential". On Thu, 5 Nov 2026 at 03:59, Wasswa Edson wrote: > Besides making the code > shorter and more idiomatic, builtin/credential.c goes from 52 lines to 140, so maybe "shorter" could go. Overall, the patch looks good, but most of the new lines are the same parse_options() call and check, repeated four times. Maybe a small helper would work here? > + if (argc) > + usage_with_options(credential_fill_usage, options); One small thing: no test covers this check. When I removed it, t0300 still passed. Maybe something like this? test_expect_success 'credential subcommands reject extra arguments' ' for sub in fill approve reject capability do test_expect_code 129 git credential $sub extra