From: Emily Shaffer Date: Wed, 22 Dec 2021 03:59:30 +0000 (+0100) Subject: am: convert {pre,post}-applypatch to use hook.h X-Git-Tag: v2.36.0-rc0~174^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=593ffdd80b33577e6b89a9b8e2e877f162b0b9e4;p=thirdparty%2Fgit.git am: convert {pre,post}-applypatch to use hook.h Teach pre-applypatch and post-applypatch to use the hook.h library instead of the run-command.h library. Signed-off-by: Emily Shaffer Signed-off-by: Ævar Arnfjörð Bjarmason Acked-by: Emily Shaffer Signed-off-by: Junio C Hamano --- diff --git a/builtin/am.c b/builtin/am.c index 8677ea2348..4b334cb7b1 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1609,7 +1609,7 @@ static void do_commit(const struct am_state *state) const char *reflog_msg, *author, *committer = NULL; struct strbuf sb = STRBUF_INIT; - if (run_hook_le(NULL, "pre-applypatch", NULL)) + if (run_hooks("pre-applypatch")) exit(1); if (write_cache_as_tree(&tree, 0, NULL)) @@ -1661,7 +1661,7 @@ static void do_commit(const struct am_state *state) fclose(fp); } - run_hook_le(NULL, "post-applypatch", NULL); + run_hooks("post-applypatch"); strbuf_release(&sb); }