git-commit: set GIT_EDITOR=: if editor will not be launched
This is a preparatory patch that provides a simple way for the future prepare-commit-msg hook to discover if the editor will be launched. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3473f3035d
commit
406400ce4f
@ -599,6 +599,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
|
||||
use_editor = 0;
|
||||
if (edit_flag)
|
||||
use_editor = 1;
|
||||
if (!use_editor)
|
||||
setenv("GIT_EDITOR", ":", 1);
|
||||
|
||||
if (get_sha1("HEAD", head_sha1))
|
||||
initial_commit = 1;
|
||||
|
Reference in New Issue
Block a user