[PATCH v3 00/17] use config-based hooks (config-based hooks part II)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since v2:
 - Renamed 'master' to 'main' in new t5411 (proc-receive) test.
 - Removed some accidentally included debug strings.
 - Fixed a nasty bug in the reference-transaction hook conversion where calling
   'oid_to_hex()' would invalidate references to the output of earlier
   'oid_to_hex()' runs farther up the callstack. Instead, the hook callsite now
   uses 'oid_to_hex_r()'.

Another thing I wanted to do in this series but ended up not having time
for before the holidays was to figure out a way to consolidate
Documentation/githooks.txt and Documentation/git-hook.txt. My personal
preference would be to remove githooks.txt's contents, move the "Hooks"
header from there into git-hook.txt, and have 'git help githooks'/'git
help hooks' redirect to git-hook.txt; I don't have a patch to share here
because I ran out of time before vacation :) What do others envision the
documentation looking like?

Thanks!
 - Emily

CI run: https://github.com/nasamuffin/git/actions/runs/436905873

Emily Shaffer (17):
  commit: use config-based hooks
  am: convert applypatch hooks to use config
  merge: use config-based hooks for post-merge hook
  gc: use hook library for pre-auto-gc hook
  rebase: teach pre-rebase to use hook.h
  read-cache: convert post-index-change hook to use config
  receive-pack: convert push-to-checkout hook to hook.h
  git-p4: use 'git hook' to run hooks
  hooks: convert 'post-checkout' hook to hook library
  hook: convert 'post-rewrite' hook to config
  transport: convert pre-push hook to use config
  reference-transaction: look for hooks in config
  receive-pack: convert 'update' hook to hook.h
  proc-receive: acquire hook list from hook.h
  post-update: use hook.h library
  receive-pack: convert receive hooks to hook.h
  run-command: stop thinking about hooks

 Documentation/githooks.txt                    |  45 +++
 builtin/am.c                                  |  30 +-
 builtin/checkout.c                            |  16 +-
 builtin/clone.c                               |   7 +-
 builtin/commit.c                              |  11 +-
 builtin/gc.c                                  |   4 +-
 builtin/merge.c                               |  14 +-
 builtin/rebase.c                              |   7 +-
 builtin/receive-pack.c                        | 326 ++++++++++--------
 builtin/worktree.c                            |  30 +-
 commit.c                                      |  20 +-
 commit.h                                      |   3 +-
 git-p4.py                                     |  67 +---
 hook.c                                        |  39 ++-
 read-cache.c                                  |  12 +-
 refs.c                                        |  38 +-
 reset.c                                       |  15 +-
 run-command.c                                 |  66 ----
 run-command.h                                 |  24 --
 sequencer.c                                   |  83 ++---
 t/t1416-ref-transaction-hooks.sh              |  12 +-
 t/t5411/test-0015-too-many-hooks-error.sh     |  47 +++
 ...3-pre-commit-and-pre-merge-commit-hooks.sh |  17 +-
 transport.c                                   |  55 +--
 24 files changed, 493 insertions(+), 495 deletions(-)
 create mode 100644 t/t5411/test-0015-too-many-hooks-error.sh

-- 
2.28.0.rc0.142.g3c755180ce-goog




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux