git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Rokos <michal@rokos.info>
To: git@vger.kernel.org
Subject: Re: [cogito] paged output for cg-diff
Date: Fri, 20 May 2005 15:17:05 +0200	[thread overview]
Message-ID: <200505201517.05995.michal@rokos.info> (raw)

Hello,

Junio is right, following is sufficent. Tested with 'more' too.

 Michal

PS: I'm off the list, so please CC me.

Signed-off-by: Michal Rokos <michal@rokos.info>
Idea-from: Junio C Hamano <junkio@cox.net>

Index: cg-Xlib
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cg-Xlib  (mode:100755)
+++ uncommitted/cg-Xlib  (mode:100755)
@@ -91,3 +91,8 @@

 export BROKEN_MKTEMP=1
 del=$($(which mktemp) -t 2>/dev/null) && { rm $del; export BROKEN_MKTEMP=; }
+
+PAGER () {
+       ${PAGER:-less} ${PAGER_FLAGS:--R}
+}
+
Index: cg-diff
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cg-diff  (mode:100755)
+++ uncommitted/cg-diff  (mode:100755)
@@ -71,7 +71,7 @@
        # FIXME: Update ret based on what did we match. And take "$@"
        # to account after all.
        ret=
-       git-diff-cache -r -z $tree | xargs -0 ${COGITO_LIB}cg-Xdiffdo "$tree" uncommitted "$filter"
+       git-diff-cache -r -z $tree | xargs -0 ${COGITO_LIB}cg-Xdiffdo "$tree" uncommitted "$filter" | PAGER

        [ "$filter" ] && rm $filter

@@ -85,7 +85,7 @@

 [ "$id1" = "$id2" ] && die "trying to diff $id1 against itself"

-git-diff-tree -r -z $id1 $id2 | xargs -0 ${COGITO_LIB}cg-Xdiffdo $id1 $id2 "$filter"
+git-diff-tree -r -z $id1 $id2 | xargs -0 ${COGITO_LIB}cg-Xdiffdo $id1 $id2 "$filter" | PAGER

 [ "$filter" ] && rm $filter
 exit 0
Index: cg-log
===================================================================
--- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cg-log  (mode:100755)
+++ uncommitted/cg-log  (mode:100755)
@@ -181,4 +181,4 @@

                done
        echo
-done | ${PAGER:-less} ${PAGER_FLAGS:--R}
+done | PAGER

             reply	other threads:[~2005-05-20 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 13:17 Michal Rokos [this message]
2005-05-20 13:50 ` [cogito] paged output for cg-diff Junio C Hamano
2005-05-29 14:01   ` Petr Baudis
  -- strict thread matches above, loose matches on Subject: below --
2005-05-20  9:05 Michal Rokos
2005-05-20 12:53 ` Junio C Hamano
2005-05-20 14:55   ` Thomas Glanzmann

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=200505201517.05995.michal@rokos.info \
    --to=michal@rokos.info \
    --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).