Re: Separating "add path to index" from "update content in index"

From: Shawn Pearce <spearce@spearce.org>
Date: 2006-12-22 16:21:56
Junio C Hamano <junkio@cox.net> wrote:
> And it is not just limited to adding the contents of a path that
> happened to be told git for the first time.  Adding the contents
> of a path that was known to git also happens only when it is in
> a presentable good state.  So running "git diff" and not seeing
> what I added before is a GOOD THING.

Yes!

Sadly it has taken me 12 months of working with Git to get
comfortable enough with that concept.

Actually it clicked once I realized that 'update-index' was actually
creating the blobs in the ODB and not 'write-tree'.  Prior to that
"click" going off in my grey matter I always felt that Git screwed
up when I did:

	$ vi foo.c
	$ git update-index foo.c
	$ git diff
	# what the ? where are my changes?

I now make quite heavy use of the index even when hacking on code,
and not just during merges.  But I wasn't like that just 5 months
ago...

-- 
Shawn.
-
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
Received on Fri Dec 22 16:23:10 2006

This archive was generated by hypermail 2.1.8 : 2006-12-22 16:24:47 EST