From: Phillip Wood <phillip.wood123@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>,
git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Subject: Re: Subject: [RFC] stash: let the stash stack live in a configurable ref
Date: Tue, 25 Aug 2026 15:43:52 +0100 [thread overview]
Message-ID: <e3e7d23c-ad66-42de-b959-f9f2fae8d16b@gmail.com> (raw)
In-Reply-To: <xmqqfr03sgyu.fsf@gitster.g>
On 24/08/2026 15:58, Junio C Hamano wrote:
> Phillip Wood <phillip.wood123@gmail.com> writes:
>
>> On a related note I've been meaning to add an option to specify an
>> alternative branch name when creating a stash, so that "git checkout -m"
>> and "git rebase --autostash <upstream> <branch>" can record the branch
>> that we're switching to, rather than the one that's currently checked
>> out when creating stashes.
>
> Interesting. I think we have seen ideas floated to allow per-branch
> and per-worktree stashes in the past. I am not sure how much we
> should rely on the stash message, though. The more heavily we rely
> on it, the more restricted the end-user messages supplied via the
> '-m' option would become. If we were to officially support
> per-branch stashes, we may have to adopt a more structured format
> (which could be something simple like "at the end of the message
> after the last ':' is the name of the branch the stash entry
> targets", alongside a tweak to the '-m' option to always append
> ': target-branch' after whatever the user gives as the message).
We add the branch name to the beginning of the user-supplied message in
create_stash(). If the user supplies the message then we prepend "On
$branch: ", if the user does not supply a message we use "WIP on $branch
..." so I think we already have simple structured messages.
Thanks
Phillip
next prev parent reply other threads:[~2026-08-25 14:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 14:19 Subject: [RFC] stash: let the stash stack live in a configurable ref Vladimir Sitnikov
2026-08-23 15:54 ` Kristoffer Haugsbakk
2026-08-24 9:13 ` Phillip Wood
2026-08-24 14:58 ` Junio C Hamano
2026-08-25 14:43 ` Phillip Wood [this message]
2026-08-25 17:38 ` Junio C Hamano
2026-08-25 18:24 ` Vladimir Sitnikov
2026-08-26 10:08 ` Phillip Wood
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=e3e7d23c-ad66-42de-b959-f9f2fae8d16b@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=sitnikov.vladimir@gmail.com \
/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