Re: [PATCH] checkout: add --progress option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Oct 30, 2015, 18:12 UTC
- Message-ID
- <CAPig+cTvRs_O8uY9_SrZZCf95Lraon8knkQUDgm0Lke3pve01A@mail.gmail.com>
- In-Reply-To
- <1446168186-4730-1-git-send-email-eantoranz@gmail.com>
On Thu, Oct 29, 2015 at 9:23 PM, Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:
Show 22 quoted lines
> Under normal circumstances, and like other git commands, > git checkout will write progress info to stderr if > attached to a terminal. This option allows progress > to be forced even if not using a terminal. Also, > progress can be skipped if using option --no-progress. > > Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com> > --- > - opts.verbose_update = !o->quiet && isatty(2); > + /** > + * Rules to display progress: > + * -q is selected > + * no verbiage > + * -q is _not_ selected and --no-progress _is_ selected, > + * progress will be skipped > + * -q is _not_ selected and --progress _is_ selected, > + * progress will be printed to stderr > + * -q is _not_ selected and --progress is 'undefined' > + * progress will be printed to stderr _if_ working on a terminal > + */ > + opts.verbose_update = !o->quiet && (option_progress > 0 || > + (option_progress < 0 && isatty(2)));
Does this logic also need to be applied to the other instance where isatty() is consulted in merge_working_tree()?