From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 4/4] Display a progress meter during merge-recursive.
Date: Sun, 14 Jan 2007 11:11:06 -0800 [thread overview]
Message-ID: <7vwt3pfmph.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.63.0701141404160.22628@wbgn013.biozentrum.uni-wuerzburg.de
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> this is a nice idea, but I think you lack a "if (!isatty(1)) do_progress =
> 0;" somewhere.
Very true. Something like this?
diff --git a/merge-recursive.c b/merge-recursive.c
index 27a861b..fa320eb 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1335,6 +1335,8 @@ int main(int argc, char *argv[])
buffer_output = 0;
do_progress = 0;
}
+ else
+ do_progress = isatty(1);
branch1 = argv[++i];
branch2 = argv[++i];
@@ -1344,10 +1346,7 @@ int main(int argc, char *argv[])
branch1 = better_branch_name(branch1);
branch2 = better_branch_name(branch2);
- if (verbosity >= 5) {
- buffer_output = 0;
- do_progress = 0;
- }
+
if (do_progress)
setup_progress_signal();
if (show(3))
next prev parent reply other threads:[~2007-01-15 17:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d352c8adb1ec1c4e74b33d51d397d5756b82ceac.1168752482.git.spearce@spearce.org>
2007-01-14 5:28 ` [PATCH 2/4] Allow the user to control the verbosity of merge-recursive Shawn O. Pearce
2007-01-14 5:28 ` [PATCH 3/4] Enable output buffering in merge-recursive Shawn O. Pearce
2007-01-14 5:28 ` [PATCH 4/4] Display a progress meter during merge-recursive Shawn O. Pearce
2007-01-14 13:04 ` Johannes Schindelin
2007-01-14 19:11 ` Junio C Hamano [this message]
2007-01-14 22:50 ` Shawn O. Pearce
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=7vwt3pfmph.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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).