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

Re: [PATCH] stash: Utilize config variable pager.stash.list in stash list command

From
Ingo Brückl <ib@wupperonline.de>
Date
Aug 17, 2011, 09:04 UTC
Message-ID
<4e4b8418.068889fb.bm001@wupperonline.de>
In-Reply-To
<4e4a58c2.48d6f6ce.bm001@wupperonline.de>

Usually it is annoying that the pager is used for stash list output, so the config variable pager.stash.list will be utilized now and is a way to control stash list's behavior.

Signed-off-by: Ingo Brückl <ib@wupperonline.de>
---
 This is the 2nd attempt, now checking for true and false.
 git-stash.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index f4e6f05..3712a17 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -264,7 +264,10 @@ have_stash () {

 list_stash () {
 	have_stash || return 0
-	git log --format="%gd: %gs" -g "$@" $ref_stash --
+	l_config=$(git config --get pager.stash.list)
+	test "$l_config" = "true" && p_option=--paginate
+	test "$l_config" = "false" && p_option=--no-pager
+	git $p_option log --format="%gd: %gs" -g "$@" $ref_stash --
 }

 show_stash () {
--
1.7.6
Previous: Ingo BrücklNext: Junio C Hamano
Message 2 of 5 in “stash: Utilize config variable pager.stash.list in stash list command”
  1. stash: Utilize config variable pager.stash.list in stash list commandIngo Brückl, Aug 16, 2011
  2. Ingo BrücklAug 17, 2011
  3. Junio C HamanoAug 17, 2011
  4. Jeff KingAug 18, 2011
  5. Ingo BrücklAug 18, 2011

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.