Re: git and bzr

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Wednesday, November 29, 2006 - 1:45 pm

On Wed, 29 Nov 2006, Marko Macek wrote:

I don't see your point, really.

Nothing forces you to change the index. None of the normal operations do 
that, for example, and you really have to _explicitly_ ask git to update 
the index for you.

So you can really think of it as a better list of names than what CVS and 
others maintain for you. It's exactly the same as the CVS "Entries" file, 
except it's got capabilities that CVS will never have - tracking not just 
the filename, but the merge status, the permissions, and the actual 
contents of an entry.

And by default, and in the absense of any failed merges, you will _never_ 
see any of those extra capabilities.


Why? I mean really.. Why do people mind the index? If you've not done 
anything to explicitly update it, and you just write "git commit", it will 
tell you exactly which files are dirty, which files are untracked, and 
then say "nothing to commit".

Maybe we shouldn't even say "use git-update-index to mark for commit", we 
should just say "use 'git commit -a' to mark for commit", but the point 
is, there really is no downside. So you forget to mention which files to 
commit, what's the downside really? It tells you what is up, and you can 
just mention the files explicitly, or use "-a" to say "ok, commit 
everything that is dirty", and it doesn't really get any simpler than 
that.

And the ADVANTAGES of the index are legion. You may not appreciate them 
initially, but the disadvantages people talk about really don't exist in 
real life, and once you actually start doing merges with conflicts, and 
fix things up one file at a time (and perhaps take a break and do 
something else before you come back to the rest of the conflicts), the 
index saves your sorry ass, and is a _huge_ advantage.

Similarly, it _allows_ you to do things that just a list of files never 
allows you to. You don't _have_ to use it to mark individual files as 
being ready to be committed, but you _can_. It's nothing that you need to 
know or worry about if you're not aware of the index, but it's a 
capability that is there for when you're willing to go there.

So there really isn't any true disadvantage. Most of the people who are 
afraid of the index have probably never actually used it, and have never 
even had a _reason_ to use it. They're nervous just because they know it 
exists, and don't know what it does.  But you can just ignore it.

So get over your fears, and just ignore it, and things will be fine.

		Linus


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: git and bzr, Jakub Narebski, (Tue Nov 28, 11:06 am)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 11:58 am)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 12:11 pm)
Re: git and bzr, Andy Parkins, (Tue Nov 28, 12:40 pm)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 1:37 pm)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 2:26 pm)
Re: git and bzr, Martin Langhoff, (Tue Nov 28, 2:40 pm)
Re: git and bzr, Linus Torvalds, (Tue Nov 28, 2:49 pm)
Re: git and bzr, Shawn Pearce, (Tue Nov 28, 2:53 pm)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 3:00 pm)
Re: git and bzr, Linus Torvalds, (Tue Nov 28, 3:13 pm)
Re: git and bzr, Linus Torvalds, (Tue Nov 28, 3:25 pm)
Re: git and bzr, Linus Torvalds, (Tue Nov 28, 3:41 pm)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 3:46 pm)
Re: git and bzr, Nicholas Allen, (Tue Nov 28, 3:48 pm)
Re: git and bzr, Johannes Schindelin, (Wed Nov 29, 3:49 am)
Re: git and bzr, Johannes Schindelin, (Wed Nov 29, 3:52 am)
Re: git and bzr, Jakub Narebski, (Wed Nov 29, 4:01 am)
Re: git and bzr, Linus Torvalds, (Wed Nov 29, 10:29 am)
Re: git and bzr, Marko Macek, (Wed Nov 29, 11:54 am)
Re: git and bzr, Johannes Schindelin, (Wed Nov 29, 1:07 pm)
Re: git and bzr, Jon Loeliger, (Wed Nov 29, 1:37 pm)
Re: git and bzr, Linus Torvalds, (Wed Nov 29, 1:45 pm)
Re: git and bzr, Jakub Narebski, (Wed Nov 29, 1:49 pm)
Re: git and bzr, Carl Worth, (Wed Nov 29, 5:05 pm)
Re: git and bzr, Carl Worth, (Wed Nov 29, 5:08 pm)
Re: git and bzr, Raimund Bauer, (Wed Nov 29, 11:59 pm)
Re: git and bzr, Carl Worth, (Thu Nov 30, 12:17 am)
Re: git and bzr, Alan Chandler, (Thu Nov 30, 1:31 am)
Re: git and bzr, Nguyen Thai Ngoc Duy, (Thu Nov 30, 2:01 am)
Re: git and bzr, Alan Chandler, (Thu Nov 30, 2:30 am)
Re: git and bzr, Steven Grimm, (Thu Nov 30, 2:39 am)
Re: git and bzr, Johannes Schindelin, (Thu Nov 30, 3:19 am)
Re: git and bzr, Nguyen Thai Ngoc Duy, (Thu Nov 30, 4:25 am)
Re: git and bzr, Johannes Schindelin, (Thu Nov 30, 5:23 am)
Re: git and bzr, Andreas Ericsson, (Thu Nov 30, 5:25 am)
Re: git and bzr, Andreas Ericsson, (Thu Nov 30, 5:45 am)
Re: git and bzr, Theodore Tso, (Thu Nov 30, 1:01 pm)