git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>,
	Scott Chacon <schacon@gmail.com>,
	Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Matthieu Moy <matthieu.moy@imag.fr>,
	Piotr Krukowiecki <piotr.krukowiecki.news@gmail.com>
Subject: Re: [1.8.0] use 'stage' term consistently
Date: Sun, 6 May 2012 23:09:49 +0200	[thread overview]
Message-ID: <CAMP44s2ubKqDeYz9r+FM+bn88uZBpNtyU94_79q0af9MZeuG9A@mail.gmail.com> (raw)
In-Reply-To: <201205061221.29592.jnareb@gmail.com>

On Sun, May 6, 2012 at 12:21 PM, Jakub Narebski <jnareb@gmail.com> 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

  parent reply	other threads:[~2012-05-06 21:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 13:04 [1.8.0] use 'stage' term consistently Felipe Contreras
2012-05-05 16:52 ` Philip Oakley
2012-05-05 17:30   ` Felipe Contreras
2012-05-05 19:53     ` Philip Oakley
2012-05-06  9:53 ` Zbigniew Jędrzejewski-Szmek
2012-05-06 10:21 ` Jakub Narebski
2012-05-06 10:39   ` Matthieu Moy
2012-05-06 20:15     ` Felipe Contreras
2012-05-06 21:21       ` Jakub Narebski
2012-05-08  3:51     ` Junio C Hamano
2012-05-06 21:09   ` Felipe Contreras [this message]
2012-05-06 10:26 ` Matthieu Moy
2012-05-06 21:16   ` Felipe Contreras
2012-05-06 21:30     ` Ævar Arnfjörð Bjarmason
2012-05-07 17:52       ` Junio C Hamano
2012-05-07 20:05         ` Ævar Arnfjörð Bjarmason
2012-05-08  4:06           ` Junio C Hamano
2012-05-08  8:55             ` Ævar Arnfjörð Bjarmason
2012-05-08 14:53               ` Junio C Hamano
2012-05-09 13:10             ` Felipe Contreras
2012-05-09 17:25               ` Matthieu Moy
2012-05-19  0:50         ` Mark Lodato
2012-05-19  6:00           ` Jonathan Nieder
2012-05-19  6:32             ` Jonathan Nieder
2012-05-20 12:04               ` Felipe Contreras
2012-05-20 18:06                 ` Jonathan Nieder
2012-05-19 10:14             ` Philip Oakley
2012-05-20 11:49             ` Felipe Contreras
2012-05-20 17:58               ` Jonathan Nieder
2012-05-20 21:11             ` Junio C Hamano
2012-05-21  1:12               ` Felipe Contreras
2012-05-21  1:32                 ` Jonathan Nieder
2012-05-18 20:34   ` Thiago Farina
2012-05-08 14:01 ` Sebastien Douche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP44s2ubKqDeYz9r+FM+bn88uZBpNtyU94_79q0af9MZeuG9A@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jrnieder@gmail.com \
    --cc=matthieu.moy@imag.fr \
    --cc=paolo.ciarrocchi@gmail.com \
    --cc=peff@peff.net \
    --cc=piotr.krukowiecki.news@gmail.com \
    --cc=schacon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).