From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: [Census] So who uses git? Date: Wed, 01 Feb 2006 16:34:34 -0500 (EST) Message-ID: References: <46a038f90601251810m1086d353ne8c7147edee4962a@mail.gmail.com> <46a038f90601272133o53438987ka6b97c21d0cdf921@mail.gmail.com> <1138446030.9919.112.camel@evo.keithp.com> <7vzmlgt5zt.fsf@assigned-by-dhcp.cox.net> <20060130185822.GA24487@hpsvcnb.fc.hp.com> <7vek2oot7z.fsf@assigned-by-dhcp.cox.net> <7v4q3jlgw2.fsf@assigned-by-dhcp.cox.net> <7vhd7ibza2.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Junio C Hamano , git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Feb 01 22:35:31 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F4Pce-0005qf-G6 for gcvg-git@gmane.org; Wed, 01 Feb 2006 22:34:41 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422945AbWBAVeg (ORCPT ); Wed, 1 Feb 2006 16:34:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422947AbWBAVeg (ORCPT ); Wed, 1 Feb 2006 16:34:36 -0500 Received: from relais.videotron.ca ([24.201.245.36]:29511 "EHLO relais.videotron.ca") by vger.kernel.org with ESMTP id S1422945AbWBAVef (ORCPT ); Wed, 1 Feb 2006 16:34:35 -0500 Received: from xanadu.home ([24.202.136.67]) by VL-MH-MR002.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0IU100FR32LMBY70@VL-MH-MR002.ip.videotron.ca> for git@vger.kernel.org; Wed, 01 Feb 2006 16:34:34 -0500 (EST) In-reply-to: X-X-Sender: nico@localhost.localdomain To: Linus Torvalds Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, 1 Feb 2006, Linus Torvalds wrote: > > > On Wed, 1 Feb 2006, Junio C Hamano wrote: > > > > 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". > > > - "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. Agreed. > > - "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". Sensible. As long as "commit files..." actually commits _only_ those files unless --index (or something) is specified to also explicitly include the index changes. What is really counter-intuitive is to have index changes merged by default when a single file is specified as argument to commit. Nicolas