"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got{,admin}.1 and tog.1: fix usage
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 4 Oct 2022 12:41:16 +0200

Download raw body.

Thread
On Sun, Oct 02, 2022 at 05:15:17PM +0200, Omar Polo wrote:
> On 2022/10/02 16:55:38 +0200, Omar Polo <op@omarpolo.com> wrote:
> > As the manpage states, `-h' and `-V' (or --version) must be given
> > before the command.  Actually, when using the flags the command is
> > actually optional.
> > 
> > 	% got cat -h
> > 	got: unknown option -- h
> > 	usage: got cat [-P] [-c commit] [-r repository-path] arg ...
> > 	% got -h cat
> > 	usage: got cat [-P] [-c commit] [-r repository-path] arg ...
> > 
> > ok?
> 
> woops, forgot to look at what the various usage() do.  Updated diff
> that syncs those too.

Marking the command name argument as optional seems a bit overkill to me.
While the command name is technically optional (can be omitted when -h is
used), it is never optional during regular day-by-day use.

Regardless, I am fine with this patch going in either way. ok stsp