Re: A few usability question about git diff --cached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 4/10/2007, a las 15:14, Junio C Hamano escribió:

Miklos Vajna <vmiklos@xxxxxxxxxxxxxx> writes:

On Thu, Oct 04, 2007 at 02:27:41PM +0200, Paolo Ciarrocchi <paolo.ciarrocchi@xxxxxxxxx> wrote:
Why do we have the option "--cached" and not "--index"?

according to glossary.txt, 'cache' is an obsolete for 'index'. probably
this is the reason

probably cache.h will be never renamed to index.h, i don't know if diff
--cached will be ever renamed to diff --index

Probably never.

Some commands support both --index and --cached and have
different meanings.  For them,

 * --index means work on both index and work tree;
 * --cached means work only on index and ignore work tree.

Look at that with fresh eyes and you can see how it makes very little sense.

The option named "--index" works on more than the index and the option named "--cached" works only on the index. This sounds back-to- front.

IMO, better names would be:

--index : means work only on the index (and ignore the work tree); ie. it means what it says

--index-and-worktree : it also means what it says

The latter is more keystrokes but it's clearer.

Having said all this, I recognize that the likelihood of these option names ever being changed is close to zero. Like Paolo says in his other email, the documentation could be made clearer to avoid possible confusion.

Cheers,
Wincent


-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux