diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-20 17:00:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-20 17:45:51 -0800 |
commit | 4c28e4ada03f5440251545cf91e0d81bce9b010d (patch) | |
tree | f915e6291e3a94d8c67fbbe190b7f5dcb193e84e /commit.h | |
parent | 4579bb418c2995a8459de7dba42b63a26006f9a6 (diff) | |
download | git-4c28e4ada03f5440251545cf91e0d81bce9b010d.tar.gz |
commit: die before asking to edit the log message
When determine_author_info() returns to the calling prepare_to_commit(),
we already know the pieces of information necessary to determine what
author ident will be used in the final message, but deferred making a call
to fmt_ident() before the final commit_tree(). Most importantly, we would
open the editor to ask the user to compose the log message before it.
As one important side effect of fmt_ident() is to error out when the given
information is malformed, this resulted in us spawning the editor first
and then refusing to commit due to error, even though we had enough
information to detect the error before starting the editor, which was
annoying.
Move the fmt_ident() call to the end of determine_author_info() where we
have final determination of author info to rectify this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions