提交 e06ad5ff 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 bc5d248a
......@@ -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 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册