Re: [PATCH 4/4] diff: turn on rename detection progress reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]