зеркало из https://github.com/microsoft/git.git
Allow --no-verify to bypass commit-msg hook
At the moment the --no-verify switch to "git commit" instructs it to skip over the pre-commit hook. Here we teach "git commit --no-verify" to skip over the commit-msg hook as well. This brings the behaviour of builtin-commit back in line with git-commit.sh. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
2ea7fe0d2c
Коммит
6b95655d7d
|
@ -792,7 +792,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
|||
rollback_index_files();
|
||||
die("could not read commit message");
|
||||
}
|
||||
if (run_hook(index_file, "commit-msg", git_path(commit_editmsg))) {
|
||||
if (!no_verify &&
|
||||
run_hook(index_file, "commit-msg", git_path(commit_editmsg))) {
|
||||
rollback_index_files();
|
||||
exit(1);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче