Re: Please default to 'commit -a' when no changes were added
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 22, 2010, 22:27 UTC
- Message-ID
- <20100422222723.GB12000@progeny.tock>
- In-Reply-To
- <x2qc376da901004221448i373a342p1d7b763383e80472@mail.gmail.com>
Adam Brewster wrote:
Show 5 quoted lines
> Consider > > $ echo -e '#!/bin/bash\nif git diff-tree --quiet HEAD; then git commit > -a; else git commit; fi' > `git --exec-path`/git-ci > $ chmod 555 `git --exec-path`/git-ci
Or just put it in your $PATH. :)
By the way, all this talk of “if there is an index” sounds funny to my brainwashed ears. Every version control system I have tried uses an index to ensure consistency during a commit; it’s just that most of them hide it from the user.
This may sound pedantic, I realize.
Have fun, Jonathan