git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Mark Lodato" <lodatom@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð" <avarab@gmail.com>,
	"Matthieu Moy" <Matthieu.Moy@grenoble-inp.fr>,
	git@vger.kernel.org, "Jeff King" <peff@peff.net>,
	"Scott Chacon" <schacon@gmail.com>,
	"Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com>,
	"Jakub Narębski" <jnareb@gmail.com>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>,
	"Piotr Krukowiecki" <piotr.krukowiecki.news@gmail.com>
Subject: Re: [1.8.0] use 'stage' term consistently
Date: Sun, 20 May 2012 14:04:46 +0200	[thread overview]
Message-ID: <CAMP44s2bbJLgqOdi49jS34E79EvNtRifpCbDE_bQUys+3xrs3w@mail.gmail.com> (raw)
In-Reply-To: <20120519063208.GA24556@burratino>

On Sat, May 19, 2012 at 8:32 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Jonathan Nieder wrote:
>
>> For the sake of having a proposal: :)
>
> For the command-line interface:
>
> Making the "git stage" command more prominent.  Unfortunately it is
> currently a synonym for "git add", which makes "git rm" less
> discoverable and generally isn't very helpful.  But if we discard that
> property, it could become a nice way to make some operations more
> discoverable:
>
>        git stage --add <paths>; # stage an addition
>        git stage --remove <paths>; # stage a removal
>        git stage --edit <paths>; # edit the staged content
>        git stage --apply <patch>; # stage the described change
>
> These would be commands that modify the index without touching the
> worktree.

If they are commands, why do they start with --?

'git stage add'
'git stage remove'
'git stage edit'

Would be more appropriate.

But I think revamping 'git stage' should be a separate task.

> Finding a better mnemonic than "also update the current directory cache"
> and "trust the current directory cache" for operations like git apply
> --index and git grep --cached.  Better concepts would be "search the
> content staged for the next commit" and "also update the staged
> content".
>
> Maybe:
>
>        git apply --index=(yes | no | only)
>                # apply                 = apply --index=no
>                # apply --index         = apply --index=yes
>                # apply --cached        = apply --index=only
>
>        git grep --index; # (= git grep --cached)
>
> I imagine others can come up with something better.

'index'? That goes contrary to this request; the term 'index' should
be avoided in porcelain commands. s/index/stage/ and the proposal
seems sensible, but I fail to see how --stage=no could be helpful, and
--stage=yes should be the same as --stage, and then I wonder what
would be the purpose of having --stage, and --stage=only, where we
could have a --stage(d)-only for commands that need this distinction
(not all of them). If in the future we want more --stage=foo options,
then it might make sense, but I just don't see that ever happening.

I guess the next step would be to list all the commands that use
--index, --staged, and --cached, and propose new options that would
eventually help to remove --index and --cached (after some period of
deprecation).

Cheers.

-- 
Felipe Contreras

  reply	other threads:[~2012-05-20 12:04 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=CAMP44s2bbJLgqOdi49jS34E79EvNtRifpCbDE_bQUys+3xrs3w@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=avarab@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=lodatom@gmail.com \
    --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.
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 NNTP newsgroup(s).