Re: [PATCH 0/2] Making "git commit" to mean "git commit -a".

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andreas Ericsson <ae@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Junio C Hamano <junkio@...>, Carl Worth <cworth@...>, Nicolas Pitre <nico@...>, <git@...>
Date: Thursday, November 30, 2006 - 11:58 am

On Thu, 30 Nov 2006, Andreas Ericsson wrote:


Sure. It's just that some people seem to expect the index to be different 
from HEAD, and are afraid of being "confused" by it.

The fear seems to be about "git diff" getting different results from "git 
diff HEAD", and always having to _check_ the two.

So I wanted to make it clear that I never have that situation, because I 
never leave the index "dirty". I agree that there is nothing odd about it, 
but I think that people who don't actively use the index (or don't use git 
at all, and just worry about it) see it as a kind of separate entity with 
a life all its own.

I can see that if you think the index is likely to be out of kilter with 
HEAD, you'd always worry about "ok, so maybe the diff I get from 'git 
diff' isn't the _true_ diff, so now I have to do _both_ 'git diff' and 
'git diff HEAD' to make sure I know what's up".

I just wanted to clarify that that is never the case for me, and I doubt 
anybody else really does it either. For a very complicated merge, I could 
possibly see somebody having a dirty index for a day or two and taking a 
break with the index dirty, but

 (a) I've certainly never seen that myself (and it would have to be 
     something very messy indeed - I remember multi-day merges with CVS, 
     but that was because CVS is so bad at merging, not because the merges 
     per se would have been all that messy)

 (b) if you have a merge _that_ messy, I don't think you're likely to 
     forget about it, and rather than be confused about the difference 
     between 'git diff' and 'git diff HEAD', you'll be really really happy 
     that you have some way of seeing just the _remaining_ pieces, rather 
     than all the crud you already fixed up.

In other words, the fact that the index _normally_ matches the HEAD may be 
obvious, but it's also important - it's important to allay fears from 
non-index users about it being somehow scary and confusing. It's not.

			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: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Johannes Schindelin, (Wed Nov 29, 10:11 pm)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Linus Torvalds, (Wed Nov 29, 11:10 pm)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Andreas Ericsson, (Thu Nov 30, 7:09 am)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Linus Torvalds, (Thu Nov 30, 11:58 am)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Robert Shearman, (Thu Nov 30, 5:33 pm)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Andreas Ericsson, (Fri Dec 1, 4:59 am)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Linus Torvalds, (Thu Nov 30, 10:44 pm)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Michael K. Edwards, (Thu Nov 30, 11:52 pm)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Johannes Schindelin, (Thu Nov 30, 6:27 am)
Re: [PATCH 0/2] Making "git commit" to mean "git commit -a"., Junio C Hamano, (Wed Nov 29, 10:12 pm)