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 /commit.h | |
| parent | Merge branch 'ab/keep-git-exit-codes-in-tests' (diff) | |
| parent | hooks: fix an obscure TOCTOU "did we just run a hook?" race (diff) | |
| download | git-7431379a9c5ed4006603114b1991c6c6e98d5dca.tar.gz git-7431379a9c5ed4006603114b1991c6c6e98d5dca.zip | |
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 'commit.h')
| -rw-r--r-- | commit.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -369,7 +369,8 @@ int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused) int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, void *unused); LAST_ARG_MUST_BE_NULL -int run_commit_hook(int editor_is_used, const char *index_file, const char *name, ...); +int run_commit_hook(int editor_is_used, const char *index_file, + int *invoked_hook, const char *name, ...); /* Sign a commit or tag buffer, storing the result in a header. */ int sign_with_header(struct strbuf *buf, const char *keyid); |
