From: Jeff King <peff@peff.net>
To: Edmundo Carmona <eantoranz@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/2] checkout: added two options to control progress output
Date: Thu, 29 Oct 2015 18:05:19 -0400 [thread overview]
Message-ID: <20151029220519.GA466@sigill.intra.peff.net> (raw)
In-Reply-To: <1445698768-22614-1-git-send-email-eantoranz@gmail.com>
On Sat, Oct 24, 2015 at 08:59:28AM -0600, Edmundo Carmona wrote:
> From: Edmundo Carmona Antoranz <eantoranz@gmail.com>
>
> checkout will refuse to print progress information if it's not connected
> to a TTY. These patches will add two options:
Not just checkout, but all of git's progress code. The usual rules are:
- if the user told us --progress, show progress
- if the user told us --no-progress, don't show progress
- if neither is set, guess based on isatty(2)
So with that in mind...
> --progress-no-tty: enable printing progress info even if not using a TTY
This should just be "--progress", shouldn't it?
It looks like checkout does not understand --progress and --no-progress.
It does have "--quiet", but elsewhere we usually use that to mean "no
progress, but also no other informational messages". We should probably
make this consistent with other commands. See how builtin/clone.c does
this, for example. Note also that clone's "quiet" option is part of
OPT__VERBOSITY(), which provides both "-q" and "-v" to turn the
verbosity level up/down. We could switch checkout to use that, too, but
I do not think it buys us anything, as we have no "-v" output for
checkout yet.
> --progress-lf: print progress information using LFs instead of CRs
I notice this is part of your patch 1, but it really seems orthogonal to
checkout's --progress option. It should probably be a separate patch,
and it probably needs some justification in the commit message (i.e.,
explain not just _what_ you are doing in the patch, but _why_ it is
useful).
It also seems like this has nothing to do with checkout in particular.
Should it be triggered by an environment variable or by an option to the
main git binary? E.g.:
git --progress-lf checkout ...
to affect the progress meter for all commands?
> Edmundo Carmona Antoranz (2):
> checkout: progress on non-tty. progress with lf
> checkout: adjust documentation to the two new options
I mentioned above that the two orthogonal features should each get their
own patches. I think you should also do the reverse with the
documentation: include it along with the implementation of the feature.
Sometimes we do documentation as a separate patch (especially if it is
large, or if the feature itself took many patches to complete). But for
a small feature, as a reviewer (and when looking back through history) I
usually find it simpler if the documentation is included in the same
commit.
> Documentation/git-checkout.txt | 10 ++++++++++
> builtin/checkout.c | 12 ++++++++++--
> progress.c | 8 +++++++-
> progress.h | 1 +
> unpack-trees.c | 3 +++
> unpack-trees.h | 2 ++
> 6 files changed, 33 insertions(+), 3 deletions(-)
I didn't look too carefully at the patches themselves, as they would
need to be reworked substantially to follow the suggestions above. But I
didn't notice any style or patch-formatting problems, and you seem to
generally be touching the right areas for what you want to do.
-Peff
next prev parent reply other threads:[~2015-10-29 22:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-24 14:59 [PATCH 0/2] checkout: added two options to control progress output Edmundo Carmona
2015-10-29 22:05 ` Jeff King [this message]
2015-10-30 0:09 ` Edmundo Carmona Antoranz
2015-10-30 0:14 ` Jeff King
2015-10-30 16:52 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151029220519.GA466@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).