git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 4/4] diff: turn on rename detection progress reporting
Date: Fri, 25 Mar 2011 05:09:18 -0400	[thread overview]
Message-ID: <20110325090918.GA7085@sigill.intra.peff.net> (raw)
In-Reply-To: <4D8C53DA.1010300@viscovery.net>

On Fri, Mar 25, 2011 at 09:35:38AM +0100, Johannes Sixt wrote:

> Am 3/24/2011 18:51, schrieb Jeff King:
> > Since all of the progress happens before we generate any
> > output, this looks OK, even when output goes to a pager.
> > We do the usual --progress/--no-progress options and check
> > isatty(2) to enable the feature.
> 
> Why does it look good? Because the pager is not spawned, yet? Then this is
> not so good because on Windows we don't have a facility to wait until
> there is output, and for this reason we spawn the pager immediately.

It depends on your pager. Less is careful not to produce any output
until it has something to show, for exactly this reason. So it looks
fine even if the pager has been started[1].

But if you have your pager set to "tig" (or you have manually piped to
it), it looks awful. And something like "git show $branch | tig" is ugly
even on Unix.

I'm not sure what the right solution is. We can add a config option like
pager.progress, but it seems like something the user shouldn't have to
care about and set manually. And that doesn't help when the user has
manually invoked a pager that takes over the terminal, like "git log |
tig".

-Peff

[1] Actually, there is a slight bug in my patch; if your pager has been
started, our isatty(2) test fails. So you get no progress for "git show"
on Windows, anyway, unless you use "--progress". "git diff", on the
other hand, starts the pager afterwards, so it does work.

  reply	other threads:[~2011-03-25  9:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 21:45 [PATCH] builtin/diff.c: remove duplicated call to diff_result_code() Junio C Hamano
2011-03-22 21:50 ` [PATCH 1/3] diffcore-rename: refactor "too many candidates" logic Junio C Hamano
2011-03-22 21:50   ` [PATCH 2/3] diffcore-rename: record filepair for rename src Junio C Hamano
2011-03-22 21:50   ` [PATCH 3/3] diffcore-rename: fall back to -C when -C -C busts the rename limit Junio C Hamano
2011-03-23 15:58     ` Jeff King
2011-03-23 16:41       ` Junio C Hamano
2011-03-23 16:50         ` Jeff King
2011-03-23 18:17       ` Jeff King
2011-03-23 18:18         ` [PATCH 1/3] pager: save the original stderr when redirecting to pager Jeff King
2011-03-23 18:19         ` [PATCH 2/3] progress: use pager's original_stderr if available Jeff King
2011-03-23 18:19         ` [PATCH 3/3] show: turn on rename progress Jeff King
2011-03-23 21:25           ` Junio C Hamano
2011-03-24 14:50             ` Jeff King
2011-03-24 15:00               ` Junio C Hamano
2011-03-24 17:45                 ` Jeff King
2011-03-24 17:46                   ` [PATCH 1/4] pager: save the original stderr when redirecting to pager Jeff King
2011-03-24 17:47                   ` [PATCH 2/4] progress: use pager's original_stderr if available Jeff King
2011-03-24 17:49                   ` [PATCH 3/4] show: turn on rename detection progress reporting Jeff King
2011-03-24 23:35                     ` Junio C Hamano
2011-03-24 17:51                   ` [PATCH 4/4] diff: " Jeff King
2011-03-25  8:35                     ` Johannes Sixt
2011-03-25  9:09                       ` Jeff King [this message]
2011-03-24 23:03                   ` [PATCH 3/3] show: turn on rename progress Junio C Hamano
2011-03-25  6:17                     ` Jeff King

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=20110325090918.GA7085@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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).