diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-03-16 17:53:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-03-16 17:53:09 -0700 |
| commit | 7431379a9c5ed4006603114b1991c6c6e98d5dca (patch) | |
| tree | fcc981d9556302ae47199fa9cc7c932ccd157bdc /sequencer.c | |
| parent | ea05fd5fbf7c28200de22cf06efee3a987dc1244 (diff) | |
| parent | a8cc594333848713b8e772cccf8159196ea85ede (diff) | |
| download | git-7431379a9c5ed4006603114b1991c6c6e98d5dca.tar.gz | |
Merge branch 'ab/racy-hooks'
Code clean-up to allow callers of run_commit_hook() to learn if it
got "success" because the hook succeeded or because there wasn't
any hook.
* ab/racy-hooks:
hooks: fix an obscure TOCTOU "did we just run a hook?" race
merge: don't run post-hook logic on --no-verify
Diffstat (limited to 'sequencer.c')
| -rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index 35006c0cea..84eed9e96b 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1220,7 +1220,7 @@ static int run_prepare_commit_msg_hook(struct repository *r, } else { arg1 = "message"; } - if (run_commit_hook(0, r->index_file, "prepare-commit-msg", name, + if (run_commit_hook(0, r->index_file, NULL, "prepare-commit-msg", name, arg1, arg2, NULL)) ret = error(_("'prepare-commit-msg' hook failed")); @@ -1552,7 +1552,7 @@ static int try_to_commit(struct repository *r, goto out; } - run_commit_hook(0, r->index_file, "post-commit", NULL); + run_commit_hook(0, r->index_file, NULL, "post-commit", NULL); if (flags & AMEND_MSG) commit_post_rewrite(r, current_head, oid); |
