]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-commit.c
Allow add_path() to add non-existent directories to the path
[git.git] / builtin-commit.c
index 7434797d1b850b25d13aab8d7aeaf85d02109a61..9a11ca0bcd402d9bd4488df6e3526e4a24617b30 100644 (file)
@@ -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 &&
@@ -876,7 +880,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
        }
 }
 
-int git_commit_config(const char *k, const char *v, void *cb)
+static int git_commit_config(const char *k, const char *v, void *cb)
 {
        if (!strcmp(k, "commit.template"))
                return git_config_string(&template_file, k, v);