Re: [ANNOUNCE] Stacked Git 0.15-rc1
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 13, 2009, 22:57 UTC
- Message-ID
- <alpine.LFD.2.01.0907131555200.13838@localhost.localdomain>
- In-Reply-To
- <b0943d9e0907131506s329bc2c2qe35180ac783a52f3@mail.gmail.com>
On Mon, 13 Jul 2009, Catalin Marinas wrote:
Show 5 quoted lines
>
> 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 ?That's not very smart.
First off, PAGER could easily be something like "/usr/local/bin/less".
Secondly, if it isn't less, so what? If it's not less, it won't care about the LESS environment variable.
So just do an unconditional
os.environ.setdefault('LESS', '-FRSX')and it will (a) work better, (b) be simpler and more efficient.
Linus