Re: Please default to 'commit -a' when no changes were added
- From
- Goswin von Brederlow <goswin-v-b@web.de>
- Date
- Apr 23, 2010, 14:23 UTC
- Message-ID
- <87bpdamem8.fsf@frosties.localdomain>
- In-Reply-To
- <20100423093943.GB30346@atjola.homenet>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
Show 17 quoted lines
> On 2010.04.22 22:37:05 +0200, Goswin von Brederlow wrote: >> 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. > > And if I happen to have two unrelated changes in a single file that's > worth nothing at all. For example, I might have changed the condition > that causes some message to be shown, and discovered a typo in the > message itself and fixed it along the way. That needs two commits, but > the list of modified files doesn't tell that. > > Only "commit -v" would help there, showing the diff in the editor. But > reviewing the diff in the editor is a PITA and I lose the whole review > progress if I find something I don't want to commit and have to abort. > Using "git add [-i|-p|-e]", git helps me to keep track of the changes I > already reviewed and decided to commit. > > Björn
Then you would keep doing that or use git commit --interactive. The suggested change would not affect you at all either way.
MfG
Goswin