git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Karsten Blees <karsten.blees@gmail.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	git@vger.kernel.org
Cc: Piotr Krukowiecki <piotr.krukowiecki.news@gmail.com>,
	Jay Soffian <jaysoffian@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Philip Oakley <philipoakley@iee.org>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	William Swanson <swansontec@gmail.com>,
	Ping Yin <pkufranky@gmail.com>,
	Hilco Wijbenga <hilco.wijbenga@gmail.com>,
	Miles Bader <miles@gnu.org>
Subject: Re: [PATCH v2 00/14] Officially start moving to the term 'staging area'
Date: Fri, 18 Oct 2013 19:41:12 -0500	[thread overview]
Message-ID: <5261d528ca9cf_35b014d9e7cb6@nysa.notmuch> (raw)
In-Reply-To: <5261C42E.4050208@gmail.com>

Karsten Blees wrote:
> Am 15.10.2013 00:29, schrieb Felipe Contreras:
> > tl;dr: everyone except Junio C Hamano and Drew Northup agrees; we should move
> > away from the name "the index".
> > 
> > It has been discussed many times in the past that 'index' is not an
> > appropriate description for what the high-level user does with it, and
> > it has been agreed that 'staging area' is the best term.
> 
> I haven't followed the previous discussion, but if a final conclusion towards
> 'staging area' has already been reached, it should probably be revised.
> 
> > The term 'staging area' is more intuitive for newcomers which are more
> > familiar with English than with Git, and it seems to be a
> > straightforward mental notion for people with different mother tongues.
> > 
> > In fact it is so intuitive that it's used already in a lot online
> > documentation, and the people that do teach Git professionally use this
> > term, because it's easier for many kinds of audiences to grasp.
> 
> Such online documentation often portraits the 'staging area' as some
> supposedly 'unique' git feature, which I find _very_ confusing. In fact,
> every major SCM has a staging area. E.g. you first need to "svn/hg/bzr/p4
> add/remove/rename/move" a file, which is somehow recorded in the working
> copy. These recorded changes will then be picked up by a subsequent
> "svn/hg/bzr/p4 commit/submit".

That is not a staging area.

  % hg init test
  % cd test
  % echo Hello > README
  % hg add README
  % echo Bye > README
  % hg commit -m Init
  % hg log -p -r -1
  changeset:   0:ba28df72474c
  tag:         tip
  user:        Felipe Contreras <felipe.contreras@gmail.com>
  date:        Fri Oct 18 19:43:42 2013 -0500
  summary:     Init

  diff -r 000000000000 -r ba28df72474c README
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
  +++ b/README	Fri Oct 18 19:43:42 2013 -0500
  @@ -0,0 +1,1 @@
  +Bye


What exactly got staged?

To me the best way to think about the staging area is like a commit draft. No
other VCS has anything like that. And what is the point about this argument?

> > index: an 'index' is a guide of pointers to something else; a book
> > index has a list of entries so the reader can locate information
> > easily without having to go through the whole book. Git porcelain is
> > not using the staging area to find out entries quicker; it's not an
> > index.
> 
> The 'staging area' is a sorted list of most recently checked out files, and
> its primary purpose is to quickly detect changes in the working copy (i.e.
> its an index).

That is not it's primary purpose.

> Of the 28 builtin main porcelain commands, 18 read the index (read_index),
> and 11 of those also check the state of the working copy (ie_match_stat).
> Incidentally, the latter include _all_ commands that update the so-called
> 'staging area'.
> 
> Subversion until recently kept the checked out files scattered in
> **/.svn/text-base directories, and many operations were terribly slow due to
> this. Subversion 1.7 introduced a new working copy format, based on a
> database in the root .svn directory (i.e. an index), leading to tremendous
> performance improvements.
> 
> The git index is a major feature that facilitates the incredible performance
> we're so much addicted to...why be shy about it and call it something else?

Tell me which subversion command adds and removes information from their
working copy metadata, which is not a used as a staging area, commit draft, or
even an index.

Moreover, we are not discussing about Git's index file, that low level concept
will stay the same, we are talking about the high level concept.

> > stage: a 'stage' is a special area designated for convenience in order
> > for some activity to take place; an orator would prepare a stage in
> > order for her speak to be successful, otherwise many people might not
> > be able to hear, or see her. Git porcelain is using the staging area
> > precisely as a special area to be separated from the working directory
> > for convenience.
> 
> I'm not a native speaker, but in my limited understanding, 'staging' in
> computer jargon is the process of preparing data for a production system
> (i.e. until the 'stage' or 'state' of the data is ready for production). It
> has nothing to do with the 'stage' in a theater.

It is the same. A stage in the theater is also used for preparing a production.

> I've never heard the term 'staging' beeing used for source code or software
> (that would be 'integration'). I've also never heard 'staging' for moving
> data back from a production system to some work- or development area.

Then why are people using it in external documentation? Why is ProGit already using it?

But more importantly: do you have a better name?

> In any sense, 'staging' is a unidirectional process (even in a theater).

It is not. Props and utilites are added and removed from the stage.

> If I think of the index as a staging area, it covers just a single use case:
> preparing new commits.

That is its main purpose.

> With this world view, it is completely counter-intuitive that e.g. changing
> branches overwrites my staging area.

Why would it do that? It's preparing the next commit, on top of which branch is
not defined yet.

> IMO, it is ok to use 'like a staging area' when we talk about using the index
> to prepare new commits.

Which is how it is being proposed; changing the name of the high-level concept.

> However, its not ok to use 'staging area' as a general synonym for the index.

Nobody is proposing that; the low-level "index file" stays the same.

-- 
Felipe Contreras

  reply	other threads:[~2013-10-19  1:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 22:29 [PATCH v2 14/14] completion: update 'git reset' new stage options Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 04/14] grep: add --staged option Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 07/14] stash: add --stage to pop and apply Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 00/14] Officially start moving to the term 'staging area' Felipe Contreras
2013-10-14 22:51   ` Felipe Contreras
2013-10-17 19:50     ` Junio C Hamano
2013-10-17 21:50       ` Felipe Contreras
2013-10-18  9:46       ` Matthieu Moy
2013-10-18 10:26         ` John Szakmeister
2013-10-18 10:36         ` Felipe Contreras
2013-10-18 11:38       ` Max Horn
2013-10-18 23:28   ` Karsten Blees
2013-10-19  0:41     ` Felipe Contreras [this message]
2013-10-19 14:08     ` Philip Oakley
2013-10-24  0:57       ` Karsten Blees
2013-10-24  8:32         ` Andreas Krey
2013-10-24 23:19         ` Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 10/14] apply: add --work, --no-work options Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 01/14] Add proper 'stage' command Felipe Contreras
2013-10-14 23:06   ` Eric Sunshine
2013-10-14 23:15     ` Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 09/14] apply: add --stage option Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 03/14] diff: document --staged Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 05/14] rm: add --staged option Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 02/14] stage: add edit command Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 13/14] reset: allow --keep with --stage Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 12/14] reset: add --stage and --work options Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 08/14] submodule: add --staged options Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 11/14] completion: update " Felipe Contreras
2013-10-14 22:29 ` [PATCH v2 06/14] stash: add --stage option to save Felipe Contreras

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=5261d528ca9cf_35b014d9e7cb6@nysa.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=hilco.wijbenga@gmail.com \
    --cc=jaysoffian@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=karsten.blees@gmail.com \
    --cc=miles@gnu.org \
    --cc=philipoakley@iee.org \
    --cc=piotr.krukowiecki.news@gmail.com \
    --cc=pkufranky@gmail.com \
    --cc=swansontec@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).