Re: git and bzr

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

 



On Wed, 29 Nov 2006 12:45:18 -0800 (PST), Linus Torvalds wrote:
>
> 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.

Yes, this is goog.

> 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".

To start with, that message confuses a lot of new users. "What do you
mean there's nothing to commit? I just made changes. And I know you
noticed them because you just mentioned the names of the files with
the changes to me!".

So at the very least, there's some missing guidance as to how to get
from the "nothing to commit" stage to actually commit the files the
user was trying to commit when they typed "git commit" in the first
place.

> 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",

Yes, I submitted a patch for this. I don't think Junio picked it up
because it got him thinking about all the other situations where "git
status" doesn't give as much guidance as it should

Even with that, the user has to go through the process of:

	git commit
	"hmm... why didn't that work"
	read message
	git commit -a

That's not a _huge_ problem, but it is a little road-bump that a lot of
people meet on their first attempt at git. In the thread on the fedora
mailing list that prompted my first "user-interface warts" and the
patch I mentioned above, the process was worse:

	git commit
	"hmm... why didn't that work"
	read message
	git update-index
	git commit
	"crap... it still didn't work even when I did what it told me to do"

Here's the original version of that report:

https://www.redhat.com/archives/fedora-maintainers/2006-November/msg00141.html

> 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.

In none of these recent threads have I been arguing disadvantages of
the index. I'm really just trying to remove one small hurdle that
does trip up new users, (see above). I'm not trying to introduce any
large conceptual change into how git works, nor even what experienced
users do.

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

Let's help people do exactly that by making the behavior of "git
commit -a" be the default for "git commit".

-Carl

Attachment: pgpDkj6BDj5P7.pgp
Description: PGP signature


[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]