Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.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: Mon, 24 Aug 2026 07:58:33 -0700	[thread overview]
Message-ID: <xmqqfr03sgyu.fsf@gitster.g> (raw)
In-Reply-To: <91feddb6-0d1b-42af-9942-307b98aa747d@gmail.com> (Phillip Wood's message of "Mon, 24 Aug 2026 10:13:37 +0100")

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).

  reply	other threads:[~2026-08-24 14:58 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 [this message]
2026-08-25 14:43     ` Phillip Wood
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=xmqqfr03sgyu.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=phillip.wood123@gmail.com \
    --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