• J
    commit: die before asking to edit the log message · 4c28e4ad
    Junio C Hamano 提交于
    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: NJunio C Hamano <gitster@pobox.com>
    4c28e4ad
commit.c 38.8 KB