diff options
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 6a9dc0e30f..9a11ca0bcd 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -646,7 +646,11 @@ static int prepare_to_commit(const char *index_file, const char *prefix) char index[PATH_MAX]; const char *env[2] = { index, NULL }; snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file); - launch_editor(git_path(commit_editmsg), NULL, env); + if (launch_editor(git_path(commit_editmsg), NULL, env)) { + fprintf(stderr, + "Please supply the message using either -m or -F option.\n"); + exit(1); + } } if (!no_verify && |