Re: [1.8.0] use 'stage' term consistently

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

 



On Sun, May 6, 2012 at 12:21 PM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:

> Anyway another issue to resolve is '--cached' and '--index' command line
> options, as described in gitcli(7) manpage:
>
>  Many commands that can work on files in the working tree
>  and/or in the index can take `--cached` and/or `--index`
>  options.  Sometimes people incorrectly think that, because
>  the index was originally called cache, these two are
>  synonyms.  They are *not* -- these two options mean very
>  different things.
>
>   * The `--cached` option is used to ask a command that
>     usually works on files in the working tree to *only* work
>     with the index.  For example, `git grep`, when used
>     without a commit to specify from which commit to look for
>     strings in, usually works on files in the working tree,
>     but with the `--cached` option, it looks for strings in
>     the index.
>
>   * The `--index` option is used to ask a command that
>     usually works on files in the working tree to *also*
>     affect the index.  For example, `git stash apply` usually
>     merges changes recorded in a stash to the working tree,
>     but with the `--index` option, it also merges changes to
>     the index as well.
>
> You can use '--staged' in place of '--cached', but what about '--index'?
> How do you replace it?

>From past discussions it was suggested to use --staged-only for
--cached, and --staged for --index in commands that need this
distinction. Alternatively it could be --cached -> --staged, --index
-> --stage-and-wd, or something like that.

Cheers.

-- 
Felipe Contreras
--
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]