Re: [RFC] New command: 'git snapshot'.
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- Feb 11, 2009, 09:04 UTC
- Message-ID
- <vpq3aelcpjk.fsf@bauges.imag.fr>
- In-Reply-To
- <20090210230054.GD26954@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Tue, Feb 10, 2009 at 06:40:34PM -0200, Fabio Augusto Dal Castel wrote: > >> Remember that 'stash' is actually TWO commands in one: >> * Save current state >> * Reset to HEAD >> >> My primary reason to use snapshots is to AVOID the second step. > > Doesn't that argue for "git stash --no-reset" or similar instead of a > separate command?
I also think adding options to "git stash" would be better than creating a new command. The "git has too many commands" is already one of the blocking factors for newcommers.
And indeed, I don't think the choice in the comparison table between stash and snapshot should be all-or-nothing. There could be individual options like --save-untracked, --per-branch, ... (--no-reset would probably be redundant with stash create, but maybe stash create needs a --keep-object-somewhere-in-a-reference like option). Then, having "git snapshot" would just be a matter of creating the accurate alias.
-- Matthieu