Re: [RFC] Rename git-rm --cached to --index
- From
Wincent Colaiuta <win@wincent.com>
- Date
- May 28, 2008, 23:57 UTC
- Message-ID
- <58CD1F67-D406-44BF-A3E2-DB57FD1742EC@wincent.com>
- In-Reply-To
- <7vprr6roxt.fsf@gitster.siamese.dyndns.org>
El 29/5/2008, a las 1:25, Junio C Hamano escribió:
Show 8 quoted lines
> Please don't make naming inconsistent. --index means "do things that > usually affect only work tree also to the index as well", while -- > cached > means "act only on the index" (study "git apply" for another example). > > "git rm" that does not touch work tree but removes only the index > entry > should be named --cached.
I think this is a bit of an arcane distinction. I wonder if a more intuitive scheme might be:
"--index" as it is now (for "do things that usually affect only work tree also to the index as well")
And:
"--index-only" for "act only on the index"
Although the latter is more characters to type than "--cached", it is a hell of a lot less surprising. For the typing-phobic there's always completion.
Let the arguments about bikeshed color and breaking people's scripts ensue!
Cheers, Wincent