login
Header Space

 
 

Re: [FAQ?] Rationale for git's way to manage the index

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Guilhem Bonnefille <guilhem.bonnefille@...>
Cc: <git@...>
Date: Monday, May 7, 2007 - 6:23 pm

On Mon, 7 May 2007, Guilhem Bonnefille wrote:


I think that the confusing thing isn't really the index, but the fact that 
git, by default, will make commits where the content in the commit is 
different from the content in the working directory. (In fact, you can use 
git-hash-object --stdin and git-update-index --cacheinfo to do a commit 
which shares no content at all with any present or past state of the 
working directory!)

In other version control systems, you have to use some option or argument 
to make that kind of non-matching commit (and you're generally limited in 
how your commits can fail to match the working directory). I think the 
confusion is that git requires an option to say that you want the commit 
to match the working directory, as opposed to creating a non-matching 
commit, which is generally the more advanced and more unusual case.

I think this is why people mostly get to understand the index by way of 
using it to resolve a conflicted merge: in that case, you have to make the 
index match the working directory before committing, and the index tracks 
your progress in reaching this state, which is the intuitive use of the 
index in normal situations.

	-Daniel
*This .sig left intentionally blank*
-
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:
[FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Sun May 6, 12:10 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Guilhem Bonnefille, (Mon May 7, 7:40 am)
Re: [FAQ?] Rationale for git's way to manage the index, Daniel Barkalow, (Mon May 7, 6:23 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Mon May 7, 8:55 am)
Re: [FAQ?] Rationale for git's way to manage the index, Junio C Hamano, (Mon May 7, 3:31 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Sun May 6, 1:25 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Sun May 6, 2:23 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Wed May 9, 1:18 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Martin Langhoff, (Mon May 7, 11:16 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Tue May 8, 7:07 am)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Tue May 8, 12:45 am)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Wed May 9, 11:52 am)
Re: [FAQ?] Rationale for git's way to manage the index, Junio C Hamano, (Wed May 9, 8:31 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Shawn O. Pearce, (Thu May 10, 6:06 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Petr Baudis, (Thu May 10, 6:51 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Steven Grimm, (Wed May 9, 10:27 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Wed May 9, 10:39 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Thu May 10, 4:00 am)
Re: [FAQ?] Rationale for git's way to manage the index, Daniel Barkalow, (Wed May 9, 1:39 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Wed May 9, 2:16 pm)
Re: [FAQ?] Rationale for git's way to manage the index, J. Bruce Fields, (Wed May 9, 1:18 pm)
Re: [FAQ?] Rationale for git's way to manage the index, J. Bruce Fields, (Wed May 9, 1:29 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Martin Langhoff, (Tue May 8, 1:35 am)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Sun May 6, 7:51 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Mon May 7, 4:02 am)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Mon May 7, 7:05 am)
Re: [FAQ?] Rationale for git's way to manage the index, Julian Phillips, (Sun May 6, 6:53 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Shawn O. Pearce, (Mon May 7, 9:41 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Shawn O. Pearce, (Tue May 8, 10:52 am)
Re: [FAQ?] Rationale for git's way to manage the index, Linus Torvalds, (Sun May 6, 3:54 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Sun May 6, 12:51 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Matthieu Moy, (Sun May 6, 1:34 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Sun May 6, 7:42 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Junio C Hamano, (Sun May 6, 1:43 pm)
Re: [FAQ?] Rationale for git's way to manage the index, Johannes Schindelin, (Wed May 9, 9:57 am)
Re: [PATCH] git-commit: Reformat log messages provided on co..., Johannes Schindelin, (Wed May 9, 11:01 am)
speck-geostationary