Re: Please default to 'commit -a' when no changes were added

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Goswin von Brederlow
Date: Thursday, April 22, 2010 - 1:37 pm

Nicolas Pitre <nico@fluxnic.net> writes:


As soon as you do 'git add -e' then you have an index. In that case a
'git commit' would use the index. There would be no change in worflow or
behaviour for you.


Is there a risk? You do get an editor with all the files affected listed
giving you a big fat warning what you are about to commit. Yes I
sometimes do start to commit wrongly too (no matter what RCS used) but
then I just close the editor to abort and commit the things seperately.


Yes, it would hide the index. But you are not just promoting it. You are
forcing people to always use it, even if only through the -a option.


But then when I accidentally use 'git ci' while having an index the
index gets ignored and all changed files get commited in one big mess.
Given how seldom I need an index (so far never) the risk of using 'git
ci' accidentally is way to high. Same with typing -a. I do it so often
that when I actualy don't want it I will probably type it anyway out of
habbit.

My way would be safe in that it will never ignore an index if there is
one. And if it is a new option then it would not alter the existing
semantic, just add to it. Call the option --smart-a or --a-if-empty.

MfG
        Goswin
--
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:
Re: Please default to 'commit -a' when no changes were added, Jonathan Nieder, (Thu Apr 22, 8:58 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Thu Apr 22, 11:37 am)
Re: Please default to 'commit -a' when no changes were added, Sverre Rabbelier, (Thu Apr 22, 12:08 pm)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Thu Apr 22, 1:37 pm)
Re: Please default to 'commit -a' when no changes were added, Jonathan Nieder, (Thu Apr 22, 3:27 pm)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 2:03 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 2:09 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 2:14 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 2:15 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 2:25 am)
Re: Please default to 'commit -a' when no changes were added, Björn Steinbrink, (Fri Apr 23, 2:39 am)
Re: Please default to 'commit -a' when no changes were added, Sverre Rabbelier, (Fri Apr 23, 4:57 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 7:23 am)
Re: Please default to 'commit -a' when no changes were added, Wincent Colaiuta, (Fri Apr 23, 9:01 am)
Re: Please default to 'commit -a' when no changes were added, Michael Witten, (Fri Apr 23, 10:00 am)
Re: Please default to 'commit -a' when no changes were added, Matthias Andree, (Fri Apr 23, 11:59 am)
Re: Please default to 'commit -a' when no changes were added, Michael Witten, (Fri Apr 23, 12:34 pm)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Fri Apr 23, 1:17 pm)
Re: Please default to 'commit -a' when no changes were added, Matthias Andree, (Fri Apr 23, 3:18 pm)
Re: Please default to 'commit -a' when no changes were added, Matthias Andree, (Fri Apr 23, 3:35 pm)
Re: 'commit -a' safety, Miles Bader, (Sat Apr 24, 2:56 am)
Re: 'commit -a' safety, Andreas Schwab, (Sat Apr 24, 3:05 am)
Re: 'commit -a' safety, Jakub Narebski, (Sat Apr 24, 3:26 am)
Re: 'commit -a' safety, Jakub Narebski, (Sat Apr 24, 4:48 am)
Re: 'commit -a' safety, Miles Bader, (Sat Apr 24, 6:29 am)
Re: 'commit -a' safety, Joey Hess, (Sat Apr 24, 7:28 am)
Re: 'commit -a' safety, Mike Hommey, (Sat Apr 24, 8:11 am)
Re: 'commit -a' safety, Nicolas Pitre, (Sat Apr 24, 11:23 am)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Sat Apr 24, 2:15 pm)
Re: Please default to 'commit -a' when no changes were added, Jonathan Nieder, (Sat Apr 24, 2:40 pm)
Re: Please default to 'commit -a' when no changes were added, Goswin von Brederlow, (Sat Apr 24, 3:08 pm)
Re: Please default to 'commit -a' when no changes were added, Jonathan Nieder, (Sat Apr 24, 3:42 pm)
Re: 'commit -a' safety, Jakub Narebski, (Sat Apr 24, 4:47 pm)
Re: 'commit -a' safety, Jakub Narebski, (Sat Apr 24, 5:16 pm)
Re: 'commit -a' safety, Junio C Hamano, (Sat Apr 24, 6:13 pm)
Re: 'commit -a' safety, Miles Bader, (Sat Apr 24, 7:43 pm)
Re: Please default to 'commit -a' when no changes were added, Jonathan Nieder, (Sat Apr 24, 8:33 pm)
Re: 'commit -a' safety, Jakub Narebski, (Sun Apr 25, 1:01 am)