Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWincent Colaiuta <win@wincent.com>2007-12-08 14:38:07 +0300
committerJunio C Hamano <gitster@pobox.com>2007-12-09 11:55:54 +0300
commit6b95655d7d2a5378e409ea0754b9b8d32ed939f8 (patch)
tree739111c3e397fd5ea1001ae3a862a90d35d748b9 /builtin-commit.c
parent2ea7fe0d2c15a88e7e3131ad5e7e83c7320d8d0c (diff)
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 19297ac027..2032ca314c 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -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);
}