git-review: make 'git change topic' with no staged changes not commit
I expect that many people (myself included) will sometimes have in
mind what they're going to do and run 'git change topic' before making
any edits. Before this CL, what that does is create a new branch and
no staged changes. Did you forget to 'git add'?
and then put you in an editor to write a commit message for an empty
commit. You're going to have to run 'git change' later, after making
the edits and running git add, so might as well delay editing of the
commit message until then. It will be easier to write the commit
message when there are actual concrete changes to describe. The
current editor pop-up is annoying.
We already avoid the editor pop-up when changing to a branch that has
a pending commit. This CL avoids it also for changing to a branch when
there's nothing staged.
Reviewed-by: Chris Manghane <email@example.com>
Reviewed-by: Andrew Gerrand <firstname.lastname@example.org>
2 files changed