Re: git and bzr

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

 



On Thu, 30 Nov 2006 07:59:19 +0100, Raimund Bauer wrote:
> * Carl Worth wrote, On 30.11.2006 01:05:
> > Let's help people do exactly that by making the behavior of "git
> > commit -a" be the default for "git commit".
> >
> Maybe we could do that _only_ if the index matches HEAD, and otherwise
> keep current behavior?
> So people who don't care about the index won't get tripped up, and when
> you do have a dirty index, you get told about it?

I thought of that tonight and almost suggested it myself. It would be
an attempt to satisfy both "sides" of the debate without either side
having to fight with a default they didn't like or configure it away.

I did wonder if the powers that be would find it a bit too magic, (the
problem with magic things is that they can sometimes be quite
confusing when they don't do exactly what you want).

But this might just work. It wouldn't be too bad to document, (we
already have several commands that change slightly if the index
doesn't match, (often by just refusing to do anything in a dirty
tree)).

And, significantly this would allow for documenting the simple
sequence of:

	# edit file
	git commit

in the tutorial while also allowing what Junio wanted:

	git update-index file
	git commit

with the behavior of, ("I already said I wanted to do a staged commit
when I explicitly updated the index, so don't make me say anything
special again when I go to commit").

Can we really get the best of both worlds here?

-Carl

Attachment: pgpQz8rjxBOEz.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]