git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: git@vger.kernel.org
Subject: [PATCH] request-pull: do not paginate output of git commands
Date: Tue, 30 Jun 2009 13:33:26 +0200	[thread overview]
Message-ID: <1246361606-20457-1-git-send-email-mmarek@suse.cz> (raw)

git request-pull called inside a terminal prints part of the output to
the terminal and other parts are piped through the pager. Fix this.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 git-request-pull.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-request-pull.sh b/git-request-pull.sh
index a2cf5b8..b3aaded 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -34,7 +34,7 @@ branch=$(git ls-remote "$url" \
 	}")
 if [ -z "$branch" ]; then
 	echo "warn: No branch of $url is at:" >&2
-	git log --max-count=1 --pretty='format:warn:   %h: %s' $headrev >&2
+	git --no-pager log --max-count=1 --pretty='tformat:warn:   %h: %s' $headrev >&2
 	echo "warn: Are you sure you pushed $head there?" >&2
 	echo >&2
 	echo >&2
@@ -45,13 +45,13 @@ fi
 PAGER=
 export PAGER
 echo "The following changes since commit $baserev:"
-git shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/  \1/'
+git --no-pager shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/  \1/'
 
 echo "are available in the git repository at:"
 echo
 echo "  $url $branch"
 echo
 
-git shortlog ^$baserev $headrev
-git diff -M --stat --summary $merge_base $headrev
+git --no-pager shortlog ^$baserev $headrev
+git --no-pager diff -M --stat --summary $merge_base $headrev
 exit $status
-- 
1.6.3

             reply	other threads:[~2009-06-30 11:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 11:33 Michal Marek [this message]
2009-06-30 16:20 ` [PATCH] request-pull: do not paginate output of git commands Junio C Hamano
2009-06-30 16:32   ` Junio C Hamano
2009-06-30 17:26     ` Michal Marek
2009-06-30 18:28 ` Junio C Hamano
2009-07-01  9:40   ` Michal Marek
2009-07-01 20:16     ` 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=1246361606-20457-1-git-send-email-mmarek@suse.cz \
    --to=mmarek@suse.cz \
    --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).