git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Git Mailing List <git@vger.kernel.org>, Karl Wiberg <kha@treskal.com>
Subject: Re: [ANNOUNCE] Stacked Git 0.15-rc1
Date: Mon, 13 Jul 2009 23:06:52 +0100	[thread overview]
Message-ID: <b0943d9e0907131506s329bc2c2qe35180ac783a52f3@mail.gmail.com> (raw)
In-Reply-To: <20090713174743.GB29333@skywalker>

2009/7/13 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>:
> On Mon, Jul 13, 2009 at 10:50:17PM +0530, Aneesh Kumar K.V wrote:
>> On Mon, Jul 13, 2009 at 06:07:06PM +0100, Catalin Marinas wrote:
>> > 2009/7/13 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>:
>> > > stg show now gives me output like below
>> > >
>> > > ESC[1mdiff --git a/fs/nfs/nfs4acl.c b/fs/nfs/nfs4acl.cESC[m
>> > > ESC[1mindex 09946da..c9a6dee 100644ESC[m
>> > > ESC[1m--- a/fs/nfs/nfs4acl.cESC[m
>> > > ESC[1m+++ b/fs/nfs/nfs4acl.cESC[m
>> > > ESC[36m@@ -37,6 +37,7 @@ESC[m
[...]
> I had PAGER=less in my .bashrc. I had set it that way because of
> https://bugs.launchpad.net/ubuntu/+source/less/+bug/67381
>
> Removing that fixed the problem

Thanks. You shouldn't remove that actually. The patch below should
give similar behaviour to Git (added to the "proposed" branch):


Set the LESS environment if the pager is 'less'

From: Catalin Marinas <catalin.marinas@arm.com>

This fixes the coloured output if the PAGER environment is set to less
(similar behaviour to Git).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 stgit/config.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/stgit/config.py b/stgit/config.py
index f205e5b..75bdadb 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -37,7 +37,7 @@ class GitConfig:
         'stgit.keepoptimized':	'no',
         'stgit.extensions':	'.ancestor .current .patched',
         'stgit.shortnr': '5',
-        'stgit.pager':  'less -FRSX'
+        'stgit.pager':  'less'
         }

     __cache = None
@@ -121,6 +121,8 @@ def config_setup():
     global config

     os.environ.setdefault('PAGER', config.get('stgit.pager'))
+    if os.environ.get('PAGER').startswith('less'):
+        os.environ.setdefault('LESS', '-FRSX')
     # FIXME: handle EDITOR the same way ?

 class ConfigOption:

-- 
Catalin

  reply	other threads:[~2009-07-13 22:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-12 22:40 [ANNOUNCE] Stacked Git 0.15-rc1 Catalin Marinas
2009-07-13  8:28 ` Uwe Kleine-König
2009-07-14 14:12   ` Catalin Marinas
2009-07-13 13:10 ` Karl Wiberg
2009-07-13 13:33 ` Aneesh Kumar K.V
2009-07-13 17:07   ` Catalin Marinas
2009-07-13 17:20     ` Aneesh Kumar K.V
2009-07-13 17:47       ` Aneesh Kumar K.V
2009-07-13 22:06         ` Catalin Marinas [this message]
2009-07-13 22:57           ` Linus Torvalds
2009-07-14  8:24             ` Catalin Marinas
2009-07-14 17:52 ` Larry D'Anna
2009-07-14 21:05   ` Catalin Marinas

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=b0943d9e0907131506s329bc2c2qe35180ac783a52f3@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /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).