All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	David Abrahams <dave@boostpro.com>,
	git@vger.kernel.org
Subject: Re: friendlier names
Date: Tue, 27 Jan 2009 11:17:17 -0800 (PST)	[thread overview]
Message-ID: <m37i4gy2z6.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vwscgy56b.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>> David Abrahams <dave@boostpro.com> wrote:
>>> 
>>> For example, why couldn't the "index" be called the "stage" instead?
>>> That, along with knowing that "git add" was a synonym for "git stage"
>>> would have flattened the learning curve considerably for me.
>>
>> Historical reasons...

[...]
> The way to update the cache was called "update-cache" then "update-index".
> Because it usually is much rare to actually add a new entry to the index
> than updating an existing entry in the index, the command had a safeguard
> against "update-cache a-newfile" without explicit request from the user to
> say "oh by the way I know I am adding new entries".  "git add" came much
> later to give you a shorthand for "update-index --add".  Updating existing
> entries in the index was still done with "update-index".
> 
> Later Nico taught (after much discussion) "git add" to also serve as
> "update-index" for existing entries in the index.
> 
> We could have called it "git update-index" when we did that switch-over,
> because the operation is exactly that --- updating the index.
> 
> But the name somehow stuck.
[...]

It is a bit of pity that "git add" was overloaded to also add new
contents and not only add new file (and its contents!), instead of
having new command "git stage" to be porcelain version of 
"git update-index" porcelain.  And perhaps "git resolved" to only
mark resolved entries (so e.g. "git resolved ." would not add new
files, nor add new contents of files which were not in conflict).

Now we have to explain that "git add" adds new contents... OTOH
it is perhaps good idea to emphasize differences between Git and
other lesser^W SCMs. ;-)  And introduce "git add -N"... 

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-01-27 19:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 15:30 friendlier names David Abrahams
2009-01-27 15:33 ` Felipe Contreras
2009-01-27 15:38 ` Shawn O. Pearce
2009-01-27 16:40   ` David Abrahams
2009-01-27 18:10   ` Johannes Schindelin
2009-01-27 18:28   ` Junio C Hamano
2009-01-27 19:17     ` Jakub Narebski [this message]
2009-01-27 19:50       ` Junio C Hamano
2009-01-28  2:12         ` Jakub Narebski
2009-01-28  4:51           ` Junio C Hamano

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=m37i4gy2z6.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=dave@boostpro.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.