Re: [PATCH] make 'git add' a first class user friendly interface to the index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 02 December 2006 16:49, Carl Worth wrote:
> 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.
...
> 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.
>

The argument I was _trying_ to make was that we should teach the second 
conceptual model not the first one AND stick with just the git add command 
(in response to your (Carl's) statement earlier in the thread that there 
needs to be two separate commands) .  My if statements were to illustrate 
that there are two fundamental ways of looking at this, not lots of ifs that 
newbies would have to consider.  We should up-front (in the tutorial, in 
appropriate man pages) use the one conceptual model (and I also like Junio's 
argument that git should take an aggressive stance of this is how the 
conceptual model is rather than the "contrary to ..." approach).



-- 
Alan Chandler
http://www.chandlerfamily.org.uk
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]