@matheusbsbs / matheus-bagliano / commits / e06ad5ffb9
Fork 0

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 <gitster@pobox.com>

Junio C Hamano committed Nov 18, 2007 at 12:21 UTC e06ad5ffb9f8d4207d676fadd675cf1b949ce358
1 file changed +1 -1
builtin-commit.c
+1 -1
@@ -598,7 +598,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
598 launch_editor(git_path(commit_editmsg), &sb);
599 else if (strbuf_read_file(&sb, git_path(commit_editmsg), 0) < 0)
600 die("could not read commit message\n");
601 - if (run_hook(index_file, "commit-msg", commit_editmsg))
601 + if (run_hook(index_file, "commit-msg", git_path(commit_editmsg)))
602 exit(1);
603 stripspace(&sb, 1);
604 if (sb.len < header_len ||