Re: [PATCH 0/2] checkout: added two options to control progress output
- From
Jeff King <peff@peff.net>
- Date
- Oct 30, 2015, 00:14 UTC
- Message-ID
- <20151030001404.GB2123@sigill.intra.peff.net>
- In-Reply-To
- <CAOc6etakOy_zZ3fH_vS5UGGqouXTd7SJFtD6UC9bZRJaYWsRQw@mail.gmail.com>
On Thu, Oct 29, 2015 at 06:09:06PM -0600, Edmundo Carmona Antoranz wrote:
> A comment there: I think more builtins support --progress than the ones that > support --no-progress, right?
Hopefully they are supported equally everywhere. Anybody using parseopt should have something like (this is from builtin/clone.c):
OPT_BOOL(0, "progress", &option_progress,
N_("force progress reporting")),That automatically gives us both --progress and --no-progress. And note how option_progress is initialized to "-1" above that, so we know the resulting value it stores will either be 1 (--progress), 0 (--no-progress), or -1 (no option specified).
-Peff