All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Miroma via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Miroma <its.miroma@proton.me>, Miroma <its.miroma@proton.me>
Subject: [PATCH] stash: don't show irrelevant entry count in status
Date: Mon, 06 Oct 2025 11:35:39 +0000	[thread overview]
Message-ID: <pull.2067.git.git.1759750539721.gitgitgadget@gmail.com> (raw)

From: Miroma <its.miroma@proton.me>

Currently, when status.showStash is set, 'stash pop' shows the
following, confusing, output:

    ...
    Your stash currently has 1 entry
    Dropped refs/stash@{0} (abc123...)

Signed-off-by: Miroma <its.miroma@proton.me>
---
    stash: don't show irrelevant entry count in status

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2067%2Fits-miroma%2Fstash-no-status-showStash-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2067/its-miroma/stash-no-status-showStash-v1
Pull-Request: https://github.com/git/git/pull/2067

 builtin/stash.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/builtin/stash.c b/builtin/stash.c
index 1977e50df2..2bd4b7d753 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -705,6 +705,9 @@ restore_untracked:
 			     absolute_path(repo_get_work_tree(the_repository)));
 		strvec_pushf(&cp.env, GIT_DIR_ENVIRONMENT"=%s",
 			     absolute_path(repo_get_git_dir(the_repository)));
+		strvec_push(&cp.env, "GIT_CONFIG_COUNT=1");
+		strvec_push(&cp.env, "GIT_CONFIG_KEY_0=status.showStash");
+		strvec_push(&cp.env, "GIT_CONFIG_VALUE_0=false");
 		strvec_push(&cp.args, "status");
 		run_command(&cp);
 	}

base-commit: c44beea485f0f2feaf460e2ac87fdd5608d63cf0
-- 
gitgitgadget

             reply	other threads:[~2025-10-06 11:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 11:35 Miroma via GitGitGadget [this message]
2025-10-06 14:43 ` [PATCH] stash: don't show irrelevant entry count in status Karthik Nayak
2025-10-06 17:21   ` Junio C Hamano
2025-10-06 18:24     ` Miroma
2025-10-09 11:03 ` [PATCH v2] stash: show correct entries count Miroma via GitGitGadget
2025-10-12 16:45   ` Miroma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.2067.git.git.1759750539721.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=its.miroma@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.