Merge branch 'dl/complete-cherry-pick-revert-skip'
[gitweb.git] / builtin / merge.c
index bf0ae68c40caca9124ae756e191d9a62b314cb56..c9746e37b86fa15963ae862ad1aaea5ece92562b 100644 (file)
@@ -287,7 +287,7 @@ static struct option builtin_merge_options[] = {
          N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
        OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
        OPT_BOOL(0, "signoff", &signoff, N_("add Signed-off-by:")),
-       OPT_BOOL(0, "no-verify", &no_verify, N_("bypass commit-msg hook")),
+       OPT_BOOL(0, "no-verify", &no_verify, N_("bypass pre-merge-commit and commit-msg hooks")),
        OPT_END()
 };
 
@@ -818,7 +818,7 @@ static void prepare_to_commit(struct commit_list *remoteheads)
        struct strbuf msg = STRBUF_INIT;
        const char *index_file = get_index_file();
 
-       if (run_commit_hook(0 < option_edit, index_file, "pre-merge-commit", NULL))
+       if (!no_verify && run_commit_hook(0 < option_edit, index_file, "pre-merge-commit", NULL))
                abort_commit(remoteheads, NULL);
        /*
         * Re-read the index as pre-merge-commit hook could have updated it,