git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] shortlog: prompt when reading from terminal by mistake
Date: Fri, 09 Mar 2007 16:39:40 -0800	[thread overview]
Message-ID: <7vwt1q2apf.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0703080827170.10832@woody.linux-foundation.org> (Linus Torvalds's message of "Thu, 8 Mar 2007 08:37:44 -0800 (PST)")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> Sure, this probably gets some cases (and the one you tried in particular), 
> but if you pipe the output to a pager, I doubt it's actually all that 
> useful.
>
> To simulate a "wait a long time without output" case, try this:
>
> 	( echo "Important warning" >&2 ; sleep 10) | less -S
>
> and at least for me, I don't see squat _in_case_I'm_at_the_top_ of the 
> window, simply because "less" will clear the screen for me.

> In other words, putting warnings on stderr usually isn't all that useful 
> when you have something like a pager that will do tty stuff - it will 
> easily overwrite the warning so quickly that you'll never see it at all.

That is correct in general, but you are being unfair.

You know git-shortlog has built-in pager _and_ you know _you_
added select(2) before spawning less, so that when that warning
is emitted, less hasn't even started running --- it cannot clear
the display.

      parent reply	other threads:[~2007-03-10  0:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 10:12 [PATCH] shortlog: prompt when reading from terminal by mistake Junio C Hamano
2007-03-08 13:04 ` Johannes Schindelin
2007-03-08 15:07 ` GSoC project mentors Shawn O. Pearce
2007-03-08 16:04   ` Alex Riesen
2007-03-09  0:59     ` Shawn O. Pearce
2007-03-09  9:50       ` Alex Riesen
2007-03-09 15:58         ` Shawn O. Pearce
2007-03-08 17:27   ` Johannes Schindelin
2007-03-09  2:26     ` Shawn O. Pearce
2007-03-08 16:37 ` [PATCH] shortlog: prompt when reading from terminal by mistake Linus Torvalds
2007-03-08 17:10   ` Johannes Schindelin
2007-03-08 17:19     ` Matthieu Moy
2007-03-08 17:28       ` Johannes Schindelin
2007-03-08 17:31     ` Linus Torvalds
2007-03-08 17:37       ` Johannes Schindelin
2007-03-09 14:41     ` Jakub Narebski
2007-03-10  0:39   ` Junio C Hamano [this message]

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=7vwt1q2apf.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).