{"thread":{"id":"9105","subject":"[PATCH] Document how to tell git to not launch a pager","startedAt":"2007-07-19T10:43:51Z","lastAt":"2007-07-19T19:50:38Z","messageCount":12,"participants":["Steven Grimm","martin f krafft","Johannes Schindelin","Julian Phillips","David Kastrup","Brian Gernhardt","Linus Torvalds","Nikolai Weibull","Matthieu Moy","Thomas Glanzmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"47835","messageId":"20070719104351.GA17182@midwinter.com","threadId":"9105","inReplyTo":null,"subject":"[PATCH] Document how to tell git to not launch a pager","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-07-19T10:43:51Z","receivedAt":"2007-07-19T10:43:51Z","isPatch":true,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Signed-off-by: Steven Grimm <koreth@midwinter.com>\n---\n Documentation/git.txt |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 3fbfd45..4c4d174 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -417,7 +417,9 @@ other\n \tSee gitlink:git-merge[1]\n \n 'GIT_PAGER'::\n-\tThis environment variable overrides `$PAGER`.\n+\tThis environment variable overrides `$PAGER`. If it is set\n+\tto an empty string or to the value \"cat\", git will not launch\n+\ta pager.\n \n 'GIT_FLUSH'::\n \tIf this environment variable is set to \"1\", then commands such\n-- \n1.5.3.rc2.4.g726f9\n"},{"id":"47839","messageId":"20070719110224.GA4293@piper.oerlikon.madduck.net","threadId":"9105","inReplyTo":"20070719104351.GA17182@midwinter.com","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2007-07-19T11:02:24Z","receivedAt":"2007-07-19T11:02:24Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Steven Grimm <koreth@midwinter.com> [2007.07.19.1243 +0200]:\n>  'GIT_PAGER'::\n> -\tThis environment variable overrides `$PAGER`.\n> +\tThis environment variable overrides `$PAGER`. If it is set\n> +\tto an empty string or to the value \"cat\", git will not launch\n> +\ta pager.\n\n+1 on the patch, but I also wonder why use of a pager is default in\ngit anyway. At least I find it to be contrary to what I am used to\non the Unix command line.\n\nFor reference, there was an argument about this in\nhttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=424978, which\nincludes a long IRC log in German, unfortunately, where a bunch of\npeople agreed with my proposal *not* to use a pager by default,\nsince it makes it difficult to use information from the output to\nassemble the next command on the command line. Every terminal in use\nnowadays can easily scroll and even search back 250 lines with the\nadded benefit of not randomly clearing the screen when you quit\n$PAGER.\n\nI am sure there is a reason for the choice of using a pager by\ndefault. Could we please either rethink this reason and possibly\nmake it non-default, or alternatively add the reason to the FAQ?\n\n-- \nmartin;              (greetings from the heart of the sun.)\n  \\____ echo mailto: !#^.\"<*>\"|tr \"<*> mailto:\" net@madduck\n \nspamtraps: madduck.bogus@madduck.net\n \nno micro$oft components were used\nin the creation or posting of this email.\ntherefore, it is 100% virus free\nand does not use html by default (yuck!).\n"},{"id":"47841","messageId":"Pine.LNX.4.64.0707191211010.14781@racer.site","threadId":"9105","inReplyTo":"20070719110224.GA4293@piper.oerlikon.madduck.net","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-19T11:13:03Z","receivedAt":"2007-07-19T11:13:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 19 Jul 2007, martin f krafft wrote:\n\n> [...] I also wonder why use of a pager is default in git anyway. At \n> least I find it to be contrary to what I am used to on the Unix command \n> line.\n\nIt was evidently liked unilaterally amongst the big whigs in the git \ncommunity.  Me too, I like it (which says nothing about my hair style).  \nOften it annoys me tremendously that all the other programs like make, ls, \netc. do not have this nice \"-p\" flag.\n\nCiao,\nDscho\n"},{"id":"47845","messageId":"Pine.LNX.4.64.0707191235490.32611@reaper.quantumfyre.co.uk","threadId":"9105","inReplyTo":"Pine.LNX.4.64.0707191211010.14781@racer.site","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-07-19T11:38:23Z","receivedAt":"2007-07-19T11:38:23Z","isPatch":true,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Thu, 19 Jul 2007, Johannes Schindelin wrote:\n\n> Hi,\n>\n> On Thu, 19 Jul 2007, martin f krafft wrote:\n>\n>> [...] I also wonder why use of a pager is default in git anyway. At\n>> least I find it to be contrary to what I am used to on the Unix command\n>> line.\n>\n> It was evidently liked unilaterally amongst the big whigs in the git\n> community.  Me too, I like it (which says nothing about my hair style).\n> Often it annoys me tremendously that all the other programs like make, ls,\n> etc. do not have this nice \"-p\" flag.\n\nI love it. It's currently playing merry havoc with my Subversion usage at \nwork though.  I've got so used to git never chucking things off the top of \nthe screen that I keep forgetting to run 'svn ... | less'.\n\nAlso searching in a console isn't anywhere near as easy.\n\n-- \nJulian\n\n  ---\nSometimes a man who deserves to be looked down upon because he is a\nfool is despised only because he is a lawyer.\n \t\t-- Montesquieu\n"},{"id":"47847","messageId":"20070719114930.GA8477@piper.oerlikon.madduck.net","threadId":"9105","inReplyTo":"Pine.LNX.4.64.0707191211010.14781@racer.site","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2007-07-19T11:49:30Z","receivedAt":"2007-07-19T11:49:30Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.07.19.1313 +0200]:\n> It was evidently liked unilaterally amongst the big whigs in the git \n> community.  Me too, I like it (which says nothing about my hair style).  \n> Often it annoys me tremendously that all the other programs like make, ls, \n> etc. do not have this nice \"-p\" flag.\n\nThanks for the explanation. I'll come back and pick up this\ndiscussion once I became a big whig in the git community. Now\nI'll add the FAQ to the wiki.\n\nhttp://git.or.cz/gitwiki/GitFaq#head-9dfc528b189148e801031d161201645af532a580\n\n-- \nmartin;              (greetings from the heart of the sun.)\n  \\____ echo mailto: !#^.\"<*>\"|tr \"<*> mailto:\" net@madduck\n \nspamtraps: madduck.bogus@madduck.net\n \n\"das internet wurde konzipiert, um einem atomschlag standzuhalten.\n leider hatte kein militärstratege mit der deutschen telekom\n gerechnet...\"\n                                                      -- attila radnai \n"},{"id":"47848","messageId":"86ir8gbo0a.fsf@lola.quinscape.zz","threadId":"9105","inReplyTo":"Pine.LNX.4.64.0707191235490.32611@reaper.quantumfyre.co.uk","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-07-19T12:01:57Z","receivedAt":"2007-07-19T12:01:57Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Julian Phillips <julian@quantumfyre.co.uk> writes:\n\n> On Thu, 19 Jul 2007, Johannes Schindelin wrote:\n>\n>> Hi,\n>>\n>> On Thu, 19 Jul 2007, martin f krafft wrote:\n>>\n>>> [...] I also wonder why use of a pager is default in git anyway. At\n>>> least I find it to be contrary to what I am used to on the Unix command\n>>> line.\n>>\n>> It was evidently liked unilaterally amongst the big whigs in the git\n>> community.  Me too, I like it (which says nothing about my hair style).\n>> Often it annoys me tremendously that all the other programs like make, ls,\n>> etc. do not have this nice \"-p\" flag.\n>\n> I love it. It's currently playing merry havoc with my Subversion usage\n> at work though.  I've got so used to git never chucking things off the\n> top of the screen that I keep forgetting to run 'svn ... | less'.\n>\n> Also searching in a console isn't anywhere near as easy.\n\nIs that the reason why users of screen get punished by default?\n\n-- \nDavid Kastrup\n"},{"id":"47866","messageId":"1F7F4219-8B2C-40A3-9F4D-BA79FAD7E2DB@silverinsanity.com","threadId":"9105","inReplyTo":"20070719110224.GA4293@piper.oerlikon.madduck.net","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-07-19T14:38:45Z","receivedAt":"2007-07-19T14:38:45Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Jul 19, 2007, at 7:02 AM, martin f krafft wrote:\n\n> +1 on the patch, but I also wonder why use of a pager is default in\n> git anyway. At least I find it to be contrary to what I am used to\n> on the Unix command line.\n>\n> For reference, there was an argument about this in\n> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=424978, which\n> includes a long IRC log in German, unfortunately, where a bunch of\n> people agreed with my proposal *not* to use a pager by default,\n> since it makes it difficult to use information from the output to\n> assemble the next command on the command line. Every terminal in use\n> nowadays can easily scroll and even search back 250 lines with the\n> added benefit of not randomly clearing the screen when you quit\n> $PAGER.\n\nI think it's because much of the core git community lives more on the  \nconsole or simple terminals like xterm than in something with easy  \nsearch and scrolling features like konsole or Terminal.app.  Git  \noutput tends to become very long very quickly, and usually you want  \nto start reading from the beginning.\n\nMany command line tools either output small chunks of input (ls, in  \nmost directories), output slowly (make), or their input is mostly  \nonly important when it errors out (make).  Git's output tends to be  \nquite long and have the most relevant (read: recent) information at  \nthe beginning so paging is pretty much a must, instead of an  \noccasional need.\n\nIf someone thinks that git paging by default is obnoxious, it just  \ntakes running \"git config --global core.pager cat\".  Now, no more  \npaging.  If you find your $PAGER clearing the screen when quitting  \nobnoxious, I suggest checking your configuration.  In particular, I  \nfind setting $LESS to \"FX\" (at least) to be most useful.\n\n~~ Brian\n"},{"id":"47887","messageId":"alpine.LFD.0.999.0707191128040.27353@woody.linux-foundation.org","threadId":"9105","inReplyTo":"86ir8gbo0a.fsf@lola.quinscape.zz","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-07-19T18:29:08Z","receivedAt":"2007-07-19T18:29:08Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 19 Jul 2007, David Kastrup wrote:\n> \n> Is that the reason why users of screen get punished by default?\n\nNo, the reason users of screen get punished is that we just think they are \nfun to torment.\n\nJust use GIT_PAGER=cat, and be happy. In fact, I'd suggest not using \nscreen at all (what a piece of horrid crap), but some people have trouble \nletting go.\n\n\t\tLinus\n"},{"id":"47890","messageId":"dbfc82860707191151w3e9571fcu60d113cba6c2f6dd@mail.gmail.com","threadId":"9105","inReplyTo":"alpine.LFD.0.999.0707191128040.27353@woody.linux-foundation.org","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Nikolai Weibull","fromEmail":"now@bitwi.se","sentAt":"2007-07-19T18:51:14Z","receivedAt":"2007-07-19T18:51:14Z","isPatch":true,"sender":{"key":"now@bitwi.se","avatar":"https://gravatar.com/avatar/d9242f067845cf9a72be23e4213c3b6e53492178e5df97372088a441af846133?d=mp&s=160"},"body":"On 7/19/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> In fact, I'd suggest not using screen at all (what a piece of horrid crap),\n> but some people have trouble letting go.\n\nI don't want to start a holy war here, but what's wrong with screen?\n\nAnd what should we be embracing instead?\n\n  nikolai\n"},{"id":"47892","messageId":"alpine.LFD.0.999.0707191155100.27353@woody.linux-foundation.org","threadId":"9105","inReplyTo":"dbfc82860707191151w3e9571fcu60d113cba6c2f6dd@mail.gmail.com","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-07-19T19:14:30Z","receivedAt":"2007-07-19T19:14:30Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 19 Jul 2007, Nikolai Weibull wrote:\n> \n> I don't want to start a holy war here, but what's wrong with screen?\n\nI actually like screen as a way to keep connections around. But the whole \nmultiplexing is wrong, wrong, wrong. It violates the \"do one thing, and do \nit well\" thing. It makes screen do two things, and do them really badly as \na result.\n\nSo the \"session\" part makes sense. It's a worthy reason to use screen.\n\nAnd the \"window manager\" part is kind of a funny hack, but let's face it, \nyou can do better by using separate windows.\n\nAnd the multiplexor could have been done (and historically _has_ been \ndone) better, by not limiting it to terminal sessions.\n\nBut the *combination* of all three is just evil and stupid. And the choice \nof ctrl-A as the default command sequence (can you even override it? Don't \nknow, don't care) is just insanity.\n\nIt's somewhat sad that screen has made some better projects not as \nsuccessful.\n\n - multiplexing. I used better programs back in the 90's to multiplex \n   arbitrary sessions over a single terminal pipe (not just terminal \n   windows). I forget the name, because these days, everybody has real \n   networking, and you'd generally use ssh tunnelling for it and \n   ssh-agent. But screen was never very good at it.\n\n - \"window manager\". Quite frankly, I've never needed it. I doubt many \n   people do. graphical environments and virtual terminals are better. And \n   if you really want a virtual terminal on a single terminal, thinking \n   that it should be mixed up with all the other things screen does is \n   just nasty.\n\n - for session management and moving things around: I think this is the \n   main reason people still use screen. It's a worthy use, but I think \n   it's sad how it's mixed up with the bad features of screen. There was a \n   \"detach\" program (or something similar) at some point that did just \n   that part of screen. But screen is just widely enough spread that \n   people are used to it, and I don't think it went anywhere.\n\nIOW, I think screen sucks because it tries to do totally independent \nthings, and then mixes them up in nasty ways, and for historical reasons \nuses a bad break character too.\n\nOh, well.\n\n\t\t\tLinus\n"},{"id":"47899","messageId":"vpq7iowxk50.fsf@bauges.imag.fr","threadId":"9105","inReplyTo":"alpine.LFD.0.999.0707191155100.27353@woody.linux-foundation.org","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-07-19T19:34:35Z","receivedAt":"2007-07-19T19:34:35Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> But the *combination* of all three is just evil and stupid. And the choice \n> of ctrl-A as the default command sequence (can you even override it? Don't \n> know, don't care) is just insanity.\n\nYes, you can. For example, I have\n\n  escape ^oo\n\nin my ~/.screenrc, and the control command is C-o, and I can do a real\nC-o by doing C-o o.\n\nThat said, I rarely use screen, just to launch a long command at work\nand get the result from home later.\n\n-- \nMatthieu\n"},{"id":"47903","messageId":"20070719195038.GP3396@cip.informatik.uni-erlangen.de","threadId":"9105","inReplyTo":"alpine.LFD.0.999.0707191155100.27353@woody.linux-foundation.org","subject":"Re: [PATCH] Document how to tell git to not launch a pager","fromName":"Thomas Glanzmann","fromEmail":"thomas@glanzmann.de","sentAt":"2007-07-19T19:50:38Z","receivedAt":"2007-07-19T19:50:38Z","isPatch":true,"sender":{"key":"thomas@glanzmann.de","avatar":null},"body":"Hello Linus,\n\nI personally use screen a lot. I have a few screen sessions running:\n\n\t- a main screen carring 70 windows. Where I do my daily work and\n\t  read my mail on. I recompiled screen to support more than 40\n\t  winodws. This screen session runs on a well connected machine.\n\t  And consumes 175M resistent memory and 450M virtual memory.\n\t  That's mainly because I have 5000 lines of scrollback buffer\n\t  in each window and I had to recompile screen with all it's\n\t  buffers 2x to fight a symtom that it always crashed for me\n\t  when I resized it to fullscreen on a monitor with resolution\n\t  of 1600x1200. Yes I did fight symptoms some times even if I\n\t  don't like it. But had you ever a look at the screen source\n\t  code. It does make you puke.\n\n\t- a local screen. If I do something on a local machine I don't\n\t  open a single terminal I open a screen session with 5 windows.\n\t  Even if I only need a single shell.  The local screen only\n\t  stays open as long as I am logged in. I switch machines often.\n\t  I have a workstation at home, one at university, a laptop and\n\t  one at work.\n\n\t- a console screen (I do a lot of system administration) so the\n\t  serial consoles of the main servers at university are\n\t  connected to a screen session. Often are up to 5 people are\n\t  connected to that session. When you have to do some sort of\n\t  maintance work we often do a telephone conference while\n\t  everyone sees what is going on.\n\n\t- a so called development screen. As you can imagine having 70\n\t  windows open you do a lot of context switches and as you\n\t  stated before \"do one thing and do it well\" does not work that\n\t  way when there is you mailreader in the way on window 6, so\n\t  when I do something I have to focus on I use the development\n\t  screen. For short projects I use the development screen.\n\n\t- one screen for work related stuff.\n\n> I actually like screen as a way to keep connections around. But the\n> whole multiplexing is wrong, wrong, wrong. It violates the \"do one\n> thing, and do it well\" thing. It makes screen do two things, and do\n> them really badly as a result.\n\nso true, as I stated above. When I notice that I go sideways I use one\nscreen per topic.\n\n> And the \"window manager\" part is kind of a funny hack, but let's face\n> it, you can do better by using separate windows.\n\nWhy I started to use screen is because I often switch workstations. And\nI want to be able to go on where I left of. So I have the same\nenvironment on every machine I have access to and synchronize this\nenvironment. I use fvwm as window manager and have something configured\nI call SmartStart. This is a fvwm function which focus an application if\nit is already running and start it if it is not running.\n\n\tCtrl Shift s => Main Screen\n\tCtrl Shift l => Local Screen\n\tCtrl Shift o => Opera\n\t...\n\t(thinkpad) [~] grep SmartStart .fvwm2rc | wc -l\n\t32\n\n\n> And the multiplexor could have been done (and historically _has_ been\n> done) better, by not limiting it to terminal sessions.\n\nI actually have a macro for university that allows me to start X\napplication out of my screen session but most of the time I use local X\napplications or use ssh forwarding if I have to get it from a remote\nmachine.\n\n> But the *combination* of all three is just evil and stupid. And the\n> choice of ctrl-A as the default command sequence (can you even\n> override it? Don't know, don't care) is just insanity.\n\nyes you can, but you get used to it.\n\n>    networking, and you'd generally use ssh tunnelling for it and \n>    ssh-agent. But screen was never very good at it.\n\nMy main screen is running in its own ssh-agent session. So does my work\nscreen. My local has automatically the ssh-agent session from my\ndesktop session.\n\n> IOW, I think screen sucks because it tries to do totally independent\n> things, and then mixes them up in nasty ways, and for historical\n> reasons uses a bad break character too.\n\nWell, I have to aggreee with you. Sometimes I come back to a windows\nwhere I stopped in the middle of doing something. And that is bad.\nHowever screen makes me work faster and makes it possible to switch\nlocations often and pick up where you left of. It's biggest strength\nit's it biggest weakness, too.\n\nMy screen configuration have dozens of people copied. I have this\nfancy sticky status bar on the bottom.\n\nhttp://wwwcip.informatik.uni-erlangen.de/~sithglan/shot.png\n\n\tThomas\n"}]}