All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stash: Don't paginate by default with list command
@ 2011-08-30 17:21 Ingo Brückl
  2011-08-30 17:43 ` Ben Walton
  2011-08-30 17:57 ` Raphael Zimmerer
  0 siblings, 2 replies; 8+ messages in thread
From: Ingo Brückl @ 2011-08-30 17:21 UTC (permalink / raw)
  To: git

The output of "stash list" is such that piping into a pager
normally isn't necessary but annoying, so disable it by default.

Signed-off-by: Ingo Brückl <ib@wupperonline.de>
---
 git-stash.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-stash.sh b/git-stash.sh
index 31dec0a..b92d986 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -264,7 +264,7 @@ have_stash () {

 list_stash () {
 	have_stash || return 0
-	git log --format="%gd: %gs" -g "$@" $ref_stash --
+	git --no-pager log --format="%gd: %gs" -g "$@" $ref_stash --
 }

 show_stash () {
--
1.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 17:21 [PATCH] stash: Don't paginate by default with list command Ingo Brückl
@ 2011-08-30 17:43 ` Ben Walton
  2011-08-30 18:24   ` Ingo Brückl
  2011-08-30 17:57 ` Raphael Zimmerer
  1 sibling, 1 reply; 8+ messages in thread
From: Ben Walton @ 2011-08-30 17:43 UTC (permalink / raw)
  To: Ingo Brückl; +Cc: git

Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:

> The output of "stash list" is such that piping into a pager
> normally isn't necessary but annoying, so disable it by default.

If you $PAGER is less and you use the default LESS environment value
FRXS, this shouldn't be annoying at all.  Are you using either a
different pager or a different value for LESS?

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 17:21 [PATCH] stash: Don't paginate by default with list command Ingo Brückl
  2011-08-30 17:43 ` Ben Walton
@ 2011-08-30 17:57 ` Raphael Zimmerer
  2011-08-30 19:26   ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: Raphael Zimmerer @ 2011-08-30 17:57 UTC (permalink / raw)
  To: Ingo Brückl; +Cc: git

On Tue, Aug 30, 2011 at 07:21:18PM +0200, Ingo Brückl wrote:
> The output of "stash list" is such that piping into a pager
> normally isn't necessary but annoying, so disable it by default.

Why is the current behaviour annoying?

Here on my (default) setup the pager automatically exits if the entire
output can be displayed on the screen, as with any other git
command. Is there any chance you have set the LESS environment
variable somewhere? To disable the pager for some commands, cou can
have a look at the *.pager config variables (man git-confg). However,
'pager.stash' is not recognized... The 'alias.*' config variables may
be interesting, too.

Raphael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 17:43 ` Ben Walton
@ 2011-08-30 18:24   ` Ingo Brückl
  2011-08-30 19:08     ` Raphael Zimmerer
  2011-08-31 18:18     ` Ingo Brückl
  0 siblings, 2 replies; 8+ messages in thread
From: Ingo Brückl @ 2011-08-30 18:24 UTC (permalink / raw)
  To: git

Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:

> Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:

>> The output of "stash list" is such that piping into a pager
>> normally isn't necessary but annoying, so disable it by default.

> If you $PAGER is less and you use the default LESS environment value
> FRXS, this shouldn't be annoying at all.  Are you using either a
> different pager or a different value for LESS?

For some reason I have '-c' in LESS which must be convenient for a case
I currently don't remember.

Ingo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 18:24   ` Ingo Brückl
@ 2011-08-30 19:08     ` Raphael Zimmerer
  2011-08-31 18:18     ` Ingo Brückl
  1 sibling, 0 replies; 8+ messages in thread
From: Raphael Zimmerer @ 2011-08-30 19:08 UTC (permalink / raw)
  To: Ingo Brückl; +Cc: git

On Tue, Aug 30, 2011 at 08:24:04PM +0200, Ingo Brückl wrote:
> Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:
> 
> > Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:
> 
> >> The output of "stash list" is such that piping into a pager
> >> normally isn't necessary but annoying, so disable it by default.
> 
> > If you $PAGER is less and you use the default LESS environment value
> > FRXS, this shouldn't be annoying at all.  Are you using either a
> > different pager or a different value for LESS?
> 
> For some reason I have '-c' in LESS which must be convenient for a case
> I currently don't remember.

When you don't require the '-c' option for paging in git, please try
'core.pager = less -FRXS'. That forces git's default behaviour
regardless of the LESS environment variable.

Raphael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 17:57 ` Raphael Zimmerer
@ 2011-08-30 19:26   ` Junio C Hamano
  2011-08-30 20:19     ` Raphael Zimmerer
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2011-08-30 19:26 UTC (permalink / raw)
  To: Raphael Zimmerer; +Cc: Ingo Brückl, git

Raphael Zimmerer <killekulla@rdrz.de> writes:

> On Tue, Aug 30, 2011 at 07:21:18PM +0200, Ingo Brückl wrote:
>> The output of "stash list" is such that piping into a pager
>> normally isn't necessary but annoying, so disable it by default.
>
> Why is the current behaviour annoying?
>
> Here on my (default) setup the pager automatically exits if the entire
> output can be displayed on the screen, as with any other git
> command.

Ben Walton pointed out exactly the same thing, but there needs one bit of
caution/consideration. If you tend to use longer and more descriptive
branch name (which is encouraged) and create a lazy stash without giving
any message, the default description of the stash would need a fairly wide
terminal window to fit on one line, e.g.

    "stash@{N}: WIP on some-long-ish-branch-name:" followed by
    "09997df a one line description of the commit your changes are made on"

concatenated on the same line. "S" in "FRSX" (the default value of "LESS"
environment variable we give to those who do not have any) is a good thing
to have while reviewing long-ish patches via "git log -p", but having a
long line that "S" causes to be chopped counts as not being able to show
the entire file on the first screen for the purpose of "F", and introduces
a minor irritation of having to exit explicitly with a 'q'.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 19:26   ` Junio C Hamano
@ 2011-08-30 20:19     ` Raphael Zimmerer
  0 siblings, 0 replies; 8+ messages in thread
From: Raphael Zimmerer @ 2011-08-30 20:19 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ingo Brückl, git

On Tue, Aug 30, 2011 at 12:26:12PM -0700, Junio C Hamano wrote:
[...]
> to have while reviewing long-ish patches via "git log -p", but having a
> long line that "S" causes to be chopped counts as not being able to show
> the entire file on the first screen for the purpose of "F", and introduces
> a minor irritation of having to exit explicitly with a 'q'.

Yes, you are right. That can be annoying. Same issue when showing the
reflog, but as it has lots of entries, the automatic pager is really
handy. I seldom use 'stash clear' (stash is a nice way for storing
working copy history somewhere...), so I don't like to miss the
pager in stash list. Maybe 'pager.stash.list' as mentioned before is
the way to go.

But as Ingo has set the LESS environment variable to some value
('-c'), he always has to press 'q', what may be his problem (beside of
the annoyance that his less now displays '~' on each empty line).

Raphael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] stash: Don't paginate by default with list command
  2011-08-30 18:24   ` Ingo Brückl
  2011-08-30 19:08     ` Raphael Zimmerer
@ 2011-08-31 18:18     ` Ingo Brückl
  1 sibling, 0 replies; 8+ messages in thread
From: Ingo Brückl @ 2011-08-31 18:18 UTC (permalink / raw)
  To: git

I wrote on Tue, 30 Aug 2011 20:24:04 +0200:

> Ben Walton wrote on Tue, 30 Aug 2011 13:43:46 -0400:

>> Excerpts from Ingo Brückl's message of Tue Aug 30 13:21:18 -0400 2011:

>>> The output of "stash list" is such that piping into a pager
>>> normally isn't necessary but annoying, so disable it by default.

>> If you $PAGER is less and you use the default LESS environment value
>> FRXS, this shouldn't be annoying at all.  Are you using either a
>> different pager or a different value for LESS?

> For some reason I have '-c' in LESS which must be convenient for a case
> I currently don't remember.

Now I know again. '-c' is within my LESS because I like small "git diff"
output printed on an erased terminal. I think it is easier to overview that
way.

With "git stash list" I'd like it the other way, because that output is
just a simple list (and usually very small in my case).

Ingo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-31 18:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 17:21 [PATCH] stash: Don't paginate by default with list command Ingo Brückl
2011-08-30 17:43 ` Ben Walton
2011-08-30 18:24   ` Ingo Brückl
2011-08-30 19:08     ` Raphael Zimmerer
2011-08-31 18:18     ` Ingo Brückl
2011-08-30 17:57 ` Raphael Zimmerer
2011-08-30 19:26   ` Junio C Hamano
2011-08-30 20:19     ` Raphael Zimmerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.