Merge branch 'jn/maint-commit-missing-template' into maint

* jn/maint-commit-missing-template:
  commit: error out for missing commit message template
This commit is contained in:
Junio C Hamano
2011-03-16 16:47:26 -07:00
2 changed files with 12 additions and 4 deletions

View File

@ -634,7 +634,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
if (strbuf_read_file(&sb, git_path("SQUASH_MSG"), 0) < 0)
die_errno("could not read SQUASH_MSG");
hook_arg1 = "squash";
} else if (template_file && !stat(template_file, &statbuf)) {
} else if (template_file) {
if (strbuf_read_file(&sb, template_file, 0) < 0)
die_errno("could not read '%s'", template_file);
hook_arg1 = "template";