From: Junio C Hamano <gitster@pobox.com>
To: "J. Dettweiler" <git.vger.kernel.org@dettweb.de>
Cc: git@vger.kernel.org
Subject: Re: [FEATURE] Proposal: git stash --only-unstaged
Date: Wed, 13 Aug 2025 08:30:16 -0700 [thread overview]
Message-ID: <xmqqjz37nss7.fsf@gitster.g> (raw)
In-Reply-To: <12fe17735317215aa0de58a20055193a@dettweb.de> (J. Dettweiler's message of "Wed, 13 Aug 2025 10:51:50 +0200")
"J. Dettweiler" <git.vger.kernel.org@dettweb.de> writes:
> **Proposed feature:**
> A new option, for example: git stash push --only-unstaged
>
> ---
>
> This would:
> - Save only the unstaged working tree changes to the stash.
> - Leave the index both in the working directory and completely absent
> from the stash object.
> - Make `stash pop` safe even if the index has changed in the meantime.
>
> ---
>
> **Benefits:**
> - Cleaner workflows for splitting commits during interactive rebases.
> - Safer testing of staged changes in isolation.
> - Avoids unnecessary conflicts on stash pop.
>
> ---
What is the downside? If the users of "git stash --keep" can keep
using the same workflow by switching to this new option, you
wouldn't be proposing it as a separate option---rather you would be
proposing an improvement to the "--keep" option. So there must be
something that the users would have to do differently if they switch
to this new "feature", but it is unclear what that is.
next prev parent reply other threads:[~2025-08-13 15:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 8:51 [FEATURE] Proposal: git stash --only-unstaged J. Dettweiler
2025-08-13 15:30 ` Junio C Hamano [this message]
2025-08-13 17:02 ` D. Ben Knoble
2025-08-16 16:12 ` Phillip Wood
2025-08-17 16:08 ` Junio C Hamano
2025-08-18 15:14 ` Phillip Wood
2025-08-18 23:41 ` Ben Knoble
2025-08-29 13:06 ` Phillip Wood
2025-08-29 13:30 ` D. Ben Knoble
2025-09-16 11:03 ` Phillip Wood
2025-09-16 17:10 ` D. Ben Knoble
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=xmqqjz37nss7.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git.vger.kernel.org@dettweb.de \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).