From: Jonathan Nieder Date: Sun, 25 Apr 2010 03:33:41 GMT Subject: Re: Please default to 'commit -a' when no changes were added Message-ID: <20100425033340.GA20921@progeny.tock> In-Reply-To: <87mxwsgser.fsf@catnip.gol.com> Miles Bader wrote: > Jonathan Nieder writes: >> But dense as I am, I still can’t imagine why >> >> echo '[alias] ci = commit -a' >>$HOME/.gitconfig >> >> wouldn’t be better in every way (especially if Jakub’s >> commit.preserveindex is enabled). > > If the latter is enabled, you can't use "git add" to add new files, > you'll have to remember to use "add -N" (or add some alias for that > too). Didn’t he first [1] propose a variant in which using ‘git add -N’ was not necessary? The rule was something like this: consider each entry. If it - matches HEAD, or - matches the work tree, or - is an intent-to-add then we say it is easily recoverable. If all index entries are easily recoverable, then let the commit -a go through. Jonathan [1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/698001/focus=145662