From: Junio C Hamano Date: Sun, 18 Nov 2007 20:21:17 +0000 (-0800) Subject: builtin-commit: run commit-msg hook with correct message file X-Git-Tag: v1.5.4-rc0~78^2~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e06ad5ffb9f8d4207d676fadd675cf1b949ce358;p=git.git builtin-commit: run commit-msg hook with correct message file It should run with $GIT_DIR/COMMIT_EDITMSG, not just COMMIT_EDITMSG. Signed-off-by: Junio C Hamano --- diff --git a/builtin-commit.c b/builtin-commit.c index 7616dd152..cd2f5cad1 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -598,7 +598,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) launch_editor(git_path(commit_editmsg), &sb); else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0) die("could not read commit message\n"); - if (run_hook(index_file, "commit-msg", commit_editmsg)) + if (run_hook(index_file, "commit-msg", git_path(commit_editmsg))) exit(1); stripspace(&sb, 1); if (sb.len < header_len ||