Re: [PATCH] checkout: add --autostash option for branch switching
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 14, 2026, 14:14 UTC
- Message-ID
- <xmqq7bq9eii9.fsf@gitster.g>
- In-Reply-To
- <xmqqmrz5eklt.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Harald Nordgren <haraldnordgren@gmail.com> writes: > >> Sounds reasonable, but wouldn't it make more sense to call it "autostash >> from master". We should still be able to abort the merge and merge it to >> some other branch. I feel like the source is more relevant than the >> destination, no? > > The new comment is for reminder, so "I made this while switching > from 'master' to this new 'topic'" theoretically has more reminding > value than "I made this while switching to this new 'topic'". As I > outlined my workflow, I usually am on 'master' or 'next' when I end > up needing "co -m" option, so "I was on 'master' when I stashed > this" has a much weaker reminding value. Just like a series of > "autostash" without any context comment irritated me, I'll see many > "autostash on master" that I cannot quite distinguish. > > But that may be just me.
In any case, the topic is already in 'next' and this kind of minor tweaks are best done as a separate topic once the basic framework that works reasonably well is established on top. We may end up wanting some mechanism to customize the message in the end but that is something we will find out and become able to decide on the best design only after we let users use it for a while.
Thanks.