Re: [PATCH] stash: Utilize config variable pager.stash.list in stash list command
- From
Jeff King <peff@peff.net>
- Date
- Aug 18, 2011, 04:26 UTC
- Message-ID
- <20110818042620.GA19045@sigill.intra.peff.net>
- In-Reply-To
- <7vd3g3ev3j.fsf@alter.siamese.dyndns.org>
On Wed, Aug 17, 2011 at 11:44:32AM -0700, Junio C Hamano wrote:
> At least "pager.stash.list" should be spelled as "pager.stashList" or > something. It is not like there are multitude of arbigrary choices that > may match "pager.*.list" pattern.
The pager code would then assume that was for a command "stashlist". It probably doesn't matter in practice, but I think it's a little nicer to keep the namespace properly separated unless there is a good reason not to.
There are other places where something like this might be handy, too. For example, auto-pagination of "git branch" or "git tag -l" (but you wouldn't want to paginate "git branch foo").
Show 6 quoted lines
> Also a variable can be set to false by setting it to 0, no, etc., so > you need to inspect it with "git config --bool" to get the canonical > version of its value. > > What's so difficult to say "git stash list | less" or even "git -p > stash list"?
Couldn't one make the same argument about git's entire use of the pager?
Anyway, I think his problem is not "I want a pager but I am too lazy to type it", but rather that "git stash list" will auto-paginate by default, because it is chaining to "log", which auto-paginates. You can turn it off with "--no-pager", but pager.stash seems to have no effect.
-Peff