From: Carl Worth <cworth@cworth.org>
To: Alan Chandler <alan@chandlerfamily.org.uk>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>,
Nicolas Pitre <nico@cam.org>
Subject: Re: [PATCH] make 'git add' a first class user friendly interface to the index
Date: Sat, 02 Dec 2006 08:49:05 -0800 [thread overview]
Message-ID: <87psb22qgu.wl%cworth@cworth.org> (raw)
In-Reply-To: <200612020828.57989.alan@chandlerfamily.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2702 bytes --]
On Sat, 2 Dec 2006 08:28:57 +0000, Alan Chandler wrote:
> There is a conceptual difference between thinking that git-add is about adding
> a file and git-add adding the current state of a files content.
Yes, there is.
> If your
> conceptual model is the first of these - then I can see why you see a problem
> with git-add being used to say a files contents have changed.
Yes. (And of course, I personally understand the second conceptual
model. But there are a lot of "brain-damaged" people out there.)
> However, if you regard the git-add command is "adding the current content of
> the file to a staging area" , and you say this is an SCM which by definition
> keeps the history of things once its been told about them I don't see why
> there is a need for a different name for the operation the first time and for
> the operation later.
Yes, that's also true. Once you know the model then you wouldn't need
two different commands. One can certainly get by with just the
functionality of "update-index" for everything.
> Trying to put myself in the shoes of a newbie - if taught to use add in both
> ways up front - is to ask why git isn't clever enough to notice that I have
> changed the content of something it already knows about rather than having it
> to manually add it again.
Yes, and "put myself in the shoes of a newbie" is what I've been doing
through the whole conversation. That's why I keep coming across as so
stubbornly stupid in these threads, ("why can't Carl just understand
how git works?!").
> So I am with you that we need to effective teach
>
> git add <filename> #add content of filename to the SCM
> #edit <filename>
> git commit -a #commit current state of all tracked content
>
> first, and then move on to teach selective commiting
Yes. That's the only way to avoid this confusion.
So all of the conditions above, ("if your conceptual model is", "if
you regard the git-add command", "if taught to use git-add up front",
"if we effectively teach 'commit -a' first"), are barriers to learning
git. We can't guarantee these are all met for new users, and when
they're not, the users can get confused.
If git's model imposes the requirement, "we should first teach one
thing, then move on to teach a subsequent thing", it would be just
that much nicer if the commands themselves could help us do that,
(because the default would do the thing they would need first, and
then the user has to explicitly do _something_ else to get the
subsequent thing).
See? I'm just trying to make the command set more naturally provide
the same flow of learning that we've been proposing for the tutorial.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-12-02 16:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 20:06 [PATCH] make 'git add' a first class user friendly interface to the index Nicolas Pitre
2006-12-01 22:31 ` Junio C Hamano
2006-12-02 0:18 ` Alan Chandler
2006-12-02 2:01 ` Nicolas Pitre
2006-12-02 3:05 ` Nicolas Pitre
2006-12-02 6:54 ` Carl Worth
2006-12-02 7:54 ` Junio C Hamano
2006-12-02 9:06 ` Carl Worth
2006-12-02 10:11 ` Jakub Narebski
2006-12-02 14:51 ` Han-Wen Nienhuys
2006-12-02 8:28 ` Alan Chandler
2006-12-02 16:49 ` Carl Worth [this message]
2006-12-02 17:12 ` Jakub Narebski
2006-12-02 18:05 ` Alan Chandler
2006-12-03 4:04 ` Nicolas Pitre
2006-12-03 4:22 ` Nicolas Pitre
2006-12-03 4:34 ` Nicolas Pitre
2006-12-02 9:52 ` Jakub Narebski
2006-12-03 5:03 ` Nicolas Pitre
2006-12-03 5:33 ` [PATCH v2] " Nicolas Pitre
2006-12-03 9:16 ` Alan Chandler
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=87psb22qgu.wl%cworth@cworth.org \
--to=cworth@cworth.org \
--cc=alan@chandlerfamily.org.uk \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=nico@cam.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 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).