Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- Date: Wed, 25 Jun 2008 16:38:22 -0400
- From: Theodore Tso <tytso@xxxxxxx>
- Subject: Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
On Wed, Jun 25, 2008 at 04:04:47PM -0400, Avery Pennarun wrote: > How about making "git checkout" default to HEAD if no revision is > supplied? There's precedent for this in, say, git-diff (and I think a > few others). > > Incidentally, "checkout <filename>" was also the way to do a revert > operation in CVS. And the way to switch branches, too, iirc. So git > isn't being too unusual here. That said, the commands were > deliberately renamed in svn because CVS was considered largely insane. The one thing I would worry about is the potential ambiguity if you do something like "git checkout FOOBAR", and FOOBAR was both a branch name as well as a file name. How should it be interpreted? I'd argue the real problem was we conflated two distinct operations: "switching to a new branch", and "reverting a file" to the same name, checkout. Hence the suggestion to add a new command, "git revert-file", where there would be no ambiguity. - Ted -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- Follow-Ups:
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Petr Baudis
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Junio C Hamano
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- References:
- [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Steven Walter
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Junio C Hamano
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Boaz Harrosh
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Johannes Schindelin
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Johannes Sixt
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Johannes Schindelin
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Theodore Tso
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Junio C Hamano
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Theodore Tso
- Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- From: Avery Pennarun
- [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- Prev by Date: Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- Next by Date: Re: policy and mechanism for less-connected clients
- Previous by thread: Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- Next by thread: Re: [PATCH] cmd_reset: don't trash uncommitted changes unless told to
- Index(es):