Re: [Census] So who uses git?
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Feb 1, 2006, 21:09 UTC
- Message-ID
- <Pine.LNX.4.64.0602011307250.21884@g5.osdl.org>
- In-Reply-To
- <7vhd7ibza2.fsf@assigned-by-dhcp.cox.net>
On Wed, 1 Feb 2006, Junio C Hamano wrote:
Show 6 quoted lines
> > How about this: > > - "git commit --also fileA..." means: update index at listed > paths (add/remove if necessary) and then commit the tree > described in index (the current behaviour with explicit paths).
I'd suggest "--incremental" instead of "--also".
Show 7 quoted lines
> - "git commit fileA..." means: create a temporary index from the > current HEAD commit (or empty index if there is none), update > it at listed paths (add/remove if necessary) and commit the > resulting tree. Also update the real index at the listed > paths (add/remove if necessary). In the original index file, > the paths listed must be either empty or match exactly the > HEAD commit -- otherwise we error out (Linus' suggestion).
Yes.
> - "git commit" means: update index with all local changes and > then commit the tree described in index (current "-a" > behaviour).
No. Please no. "git commit" should continue to do what it does now. Otherwise you can't do the two-stage thing in any sane way.
Requiring "--incremental"/"--also" is very confusing.
If somebody doesn't know about the index, he normally will never have index changes _anyway_, except for the "git add" case. In which case "git commit" does the right thing for him: it will either commit the added files, or it will say "nothing to commit".
Linus