git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] Stacked Git 0.15-rc1

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Jul 14, 2009, 08:24 UTC
Message-ID
<b0943d9e0907140124u6e804ef2i5a17c23a44eda50f@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.01.0907131555200.13838@localhost.localdomain>
2009/7/13 Linus Torvalds <torvalds@linux-foundation.org>:
Show 19 quoted lines
> On Mon, 13 Jul 2009, Catalin Marinas wrote:
>>
>>      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.
Good point. Thanks. This is the new version:
diff --git a/stgit/config.py b/stgit/config.py
index f205e5b..4a6cb3b 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,7 @@ def config_setup():
     global config

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

 class ConfigOption:
-- 
Catalin
Previous: Linus TorvaldsNext: Larry D'Anna
Message 11 of 13 in “[ANNOUNCE] Stacked Git 0.15-rc1”
  1. Catalin MarinasJul 12, 2009
  2. Uwe Kleine-KönigJul 13, 2009
  3. Catalin MarinasJul 14, 2009
  4. Karl WibergJul 13, 2009
  5. Aneesh Kumar K.VJul 13, 2009
  6. Catalin MarinasJul 13, 2009
  7. Aneesh Kumar K.VJul 13, 2009
  8. Aneesh Kumar K.VJul 13, 2009
  9. Catalin MarinasJul 13, 2009
  10. Linus TorvaldsJul 13, 2009
  11. Catalin MarinasJul 14, 2009
  12. Larry D'AnnaJul 14, 2009
  13. Catalin MarinasJul 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.