git and bzr

Johannes Schindelin Johannes.Schindelin at gmx.de
Wed Nov 29 20:07:04 GMT 2006


Hi,

On Wed, 29 Nov 2006, Marko Macek wrote:

> Linus Torvalds wrote:
> > So most of the time, when you use git, you can ignore the index. It's 
> > really important, and it's used _all_ the time, but you can still 
> > mostly ignore it. But when handling a merge conflict, the index is 
> > really what sets git apart, and what really helps a LOT.
> 
> Actually, people (at least me) dislike the index because in the most 
> common operations (status, diff, commit), they have to know that the 
> command doesn't actually display all their work but just the 'indexed' 
> part of it.

No. It does display all your work.

However, as Linus pointed out, if there are automatically merged entries 
without conflicts, it will not display them. Which is sane!

And yes, you can hide some modifications by putting the modified file into 
the index. But then you did that very much on purpose.

> For people used to cvs, svn and other systems it would be nicer if diff 
> -a and commit -a (and possibly other commands) were the default.

And what exactly do you think is happening when "cvs add" and "svn add" 
did _not_ really add the file to the repository, but only a subsequent 
"commit" does?

> index is of course necessary during merging, ... and as a speed 
> optimization for applying patches when you know the working copy is 
> clean.

I think that it is one major achievement of git to make clear and sane 
definitions of branches (which are really just pointers 
into the revision graph), and the index (which is the staging area).

Ciao,
Dscho





More information about the bazaar mailing list