Re: [RFC] New command: 'git snapshot'.
- From
Jeff King <peff@peff.net>
- Date
- Feb 11, 2009, 13:43 UTC
- Message-ID
- <20090211134322.GB19223@coredump.intra.peff.net>
- In-Reply-To
- <83d7aaa40902101539m3c40deeeo2d452f6dbb7c379c@mail.gmail.com>
On Tue, Feb 10, 2009 at 03:39:19PM -0800, Geoffrey Lee wrote:
> Git stash doesn't touch untracked files, whereas git snapshot would. > Take another closer look at the table in the original post titled > "What are the differences between 'git stash' and 'git snapshot'?"
Sure, I was just responding to that particular statement about reset. But I think it generalizes. Why not "--untracked" as an option?
In other words, there are several behaviors that people might not like about stash, and I think they can be combined in multiple ways. So one solution is to make another command which chooses a different set of behaviors. But what about the person who wants "--untracked" but not "--no-reset"? Do they make a third command?
So it is much more flexible to make orthogonal switches that can be turned on and off independently. And of course if you have a workflow which always uses a particular set of switches, it is convenient to hide it behind an alias. And if there are just a few workflows that are common to a lot of people, those can graduate to become git commands.
But this proposal seems to be starting in the opposite direction, with a new command that is closely related to stash but changes a few behaviors. I haven't seen a convincing argument that between stash and snapshot, git will now serve all or most people's workflows (and we don't need another command that does something in between).
-Peff