Re: Please default to 'commit -a' when no changes were added
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Apr 22, 2010, 21:40 UTC
- Message-ID
- <vpq7hnzcgjq.fsf@bauges.imag.fr>
- In-Reply-To
- <7vsk6n2n48.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Think of this sequence:
There's another case where it would be hard to decide what's "The Right Thing":
vi existing-file.c # do some changes vi new-file.c # create the file git add new-file.c git commit
If you take the SVN semantics, the last "git commit" should commit the changes to existing-file.c. But keeping the current Git semantics, it doesn't. There are valid reasons why a user can type the above sequence with today's Git, and changing it would be backward incompatible, and would make the senario a lot more painfull.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/