mbox series

[0/2] builtin/bundle.c: segfault fix style & error reporting follow-up

Message ID cover-0.2-00000000000-20221227T183708Z-avarab@gmail.com (mailing list archive)
Headers show
Series builtin/bundle.c: segfault fix style & error reporting follow-up | expand

Message

Ævar Arnfjörð Bjarmason Dec. 27, 2022, 6:39 p.m. UTC
On Sun, Dec 25 2022, Junio C Hamano wrote:

> That would actually make the intent much clearer and if the code
> were written to update argc instead of introducing a separate
> varilable, this bug would not have happened.

Here's a couple of general improvements on top of ab/bundle-wo-args,
we should also report to the user that they were missing the <file>
argument, as 2/2 here fixes.

Ævar Arnfjörð Bjarmason (2):
  builtin/bundle.c: remove superfluous "newargc" variable
  bundle <cmd>: have usage_msg_opt() note the missing "<file>"

 builtin/bundle.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Junio C Hamano Dec. 27, 2022, 11:32 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Here's a couple of general improvements on top of ab/bundle-wo-args,
> we should also report to the user that they were missing the <file>
> argument, as 2/2 here fixes.
>
> Ævar Arnfjörð Bjarmason (2):
>   builtin/bundle.c: remove superfluous "newargc" variable
>   bundle <cmd>: have usage_msg_opt() note the missing "<file>"
>
>  builtin/bundle.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

I have no strong opinions on the second one, but the first one is a
definite improvement.  Will queue both.  Thanks.