aboutsummaryrefslogtreecommitdiff
path: root/pager.c
Commit message (Collapse)AuthorAge
* pager: Work around window resizing bug in 'less'Linus Torvalds2007-02-05
| | | | | | | | | | | | | | | | | | | | If you resize the terminal while less is waiting for input, less will exit entirely without even showing the output. This is very noticeable if you do something like "git diff" on a big and cold-cache tree and git takes a few seconds to think, and then you resize the window while it's preparing. Boom. No output AT ALL. The way to reproduce the problem is to do some pager operation that takes a while in git, and resizing the window while git is thinking about the output. Try git diff --stat v2.6.12.. in the kernel tree to do something where it takes a while for git to start outputting information. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pager: default to LESS=FRSX not LESS=FRSJunio C Hamano2006-10-22
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* pager: default to LESS=FRSJunio C Hamano2006-10-20
| | | | | | | | Recent change to paginate "git diff" by default is often irritating when you do not have any change (or very small change) in your working tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pager: environment variable GIT_PAGER to override PAGERMatthias Lederhofer2006-07-31
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix linking for not-so-clever linkers.Johannes Schindelin2006-07-10
| | | | | | | | | | On one of my systems, the linker is not intelligent enough to link with pager.o (in libgit.a) when only the variable pager_in_use is needed. The consequence is that the linker complains about an undefined variable. So, put the variable into environment.o, where it is linked always. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* "git -p cmd" to page anywhereJunio C Hamano2006-07-09
| | | | | | | | | | | | | This allows you to say: git -p diff v2.6.16-rc5.. and the command pipes the output of any git command to your pager. [jc: this resurrects a month old RFC patch with improvement suggested by Linus to call it --paginate instead of --less.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff options: add --colorJohannes Schindelin2006-06-17
| | | | | | | | | | | This patch is a slightly adjusted version of Junio's patch: http://www.gelato.unsw.edu.au/archives/git/0604/19354.html However, instead of using a config variable, this patch makes it available as a diff option. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fix'Junio C Hamano2006-04-21
|\ | | | | | | | | * fix: git-log produces no output
| * git-log produces no outputLinus Torvalds2006-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When $PAGER is set to 'less -i', we used to fail because we assumed the $PAGER is a command and simply exec'ed it. Try exec first, and then run it through shell if it fails. This allows even funkier PAGERs like these ;-): PAGER='sed -e "s/^/`date`: /" | more' PAGER='contrib/colordiff.perl | less -RS' Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Do not fork PAGER=catJunio C Hamano2006-04-16
|/ | | | | | | | Unless the user has a nonstandard "cat" command that does not meow like a cat, this should not break anything and would save an extra pipe. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pager: do not fork a pager if PAGER is set to empty.Johannes Schindelin2006-04-16
| | | | | | | | | | This skips an extra pipe, and helps debugging tremendously. [jc: PAGER=cat is a questionable hack and should be done as a separate patch. ] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Introduce trivial new pager.c helper infrastructureLinus Torvalds2006-02-28
This introduces the new function void setup_pager(void); to set up output to be written through a pager applocation. All in preparation for doing the simple scripts in C. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>