mbox series

[0/9] config-based hooks restarted

Message ID 20210715232603.3415111-1-emilyshaffer@google.com (mailing list archive)
Headers show
Series config-based hooks restarted | expand

Message

Emily Shaffer July 15, 2021, 11:25 p.m. UTC
The work formerly found at
https://lore.kernel.org/git/20210527000856.695702-1-emilyshaffer@google.com
has been rebased on top of
https://lore.kernel.org/git/cover-00.27-0000000000-20210617T101216Z-avarab@gmail.com
(ab/config-based-hooks-base).

Some features have been dropped from v9 of the larger config-based-hooks
series, and many patches have been replaced by Ævar's new base.

This series no longer introduces the 'hook.runHooksDir' config - I think
it is OK to introduce that later and quibble about it in isolation from
the rest of this work.

I also would encourage folks interested in reviewing this to not spend
too much time looking through it without first leaving a review on
Ævar's series which this is based on; this series won't go anywhere
without that one. :) (And yes, I owe a review on the more recent version
of that series, too.)

Note: I am worried that somewhere around patch 6 a flaky test may have
been added - I saw flaky failures on the osx-clang and linux-musl tests
when I ran CI on GitHub. I *think* this was due to missing a field when
initializing 'struct hook' for addition to the hook linked list, and I
*think* I have fixed that, but if something jumps out to anyone in the
code or in the test, I'd really appreciate the hint. A passing CI run
for the tip of this series is at
https://github.com/nasamuffin/git/actions/runs/1035559898.

 - Emily

Emily Shaffer (9):
  hook: run a list of hooks instead
  hook: allow parallel hook execution
  hook: introduce "git hook list"
  hook: treat hookdir hook specially
  hook: allow running non-native hooks
  hook: include hooks from the config
  hook: allow out-of-repo 'git hook' invocations
  hook: teach 'hookcmd' config to alias hook scripts
  hook: implement hookcmd.<name>.skip

 Documentation/config/hook.txt |  22 +++
 Documentation/git-hook.txt    |  97 ++++++++++++-
 builtin/am.c                  |  12 +-
 builtin/checkout.c            |   3 +-
 builtin/clone.c               |   3 +-
 builtin/gc.c                  |   3 +-
 builtin/hook.c                |  58 +++++++-
 builtin/merge.c               |   3 +-
 builtin/rebase.c              |   3 +-
 builtin/receive-pack.c        |  14 +-
 builtin/worktree.c            |   3 +-
 commit.c                      |   4 +-
 git.c                         |   2 +-
 hook.c                        | 251 +++++++++++++++++++++++++++++++---
 hook.h                        |  44 ++++--
 read-cache.c                  |   3 +-
 refs.c                        |   3 +-
 reset.c                       |   4 +-
 sequencer.c                   |   7 +-
 t/t1360-config-based-hooks.sh | 227 ++++++++++++++++++++++++++++++
 transport.c                   |   4 +-
 21 files changed, 711 insertions(+), 59 deletions(-)
 create mode 100644 Documentation/config/hook.txt
 create mode 100755 t/t1360-config-based-hooks.sh