use config-based hooks (config-based hooks part II)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest17 patches 10 repliesIn review
- v117 patches 4 repliesSuperseded
Changes in v3 from the cover letter
- 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()'.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | commit: use config-based hooksDocumentation/ builtin/ builtin/ +4 more | +56 | 5 replies | |
| 2/17 | am: convert applypatch hooks to use configDocumentation/ builtin/ | +15 | 1 reply | |
| 3/17 | merge: use config-based hooks for post-merge hookDocumentation/ builtin/ | +6 | 0 replies | |
| 4/17 | gc: use hook library for pre-auto-gc hookDocumentation/ builtin/ | +5 | 0 replies | |
| 5/17 | rebase: teach pre-rebase to use hook.hDocumentation/ builtin/ | +7 | 0 replies | |
| 6/17 | read-cache: convert post-index-change hook to use configDocumentation/ read-cache.c | +11 | 0 replies | |
| 7/17 | receive-pack: convert push-to-checkout hook to hook.hDocumentation/ builtin/ | +12 | 0 replies | |
| 8/17 | git-p4: use 'git hook' to run hooksgit-p4.py | +6 | 0 replies | |
| 9/17 | hooks: convert 'post-checkout' hook to hook libraryDocumentation/ builtin/ builtin/ +2 more | +43 | 0 replies | |
| 10/17 | hook: convert 'post-rewrite' hook to configDocumentation/ builtin/ sequencer.c | +36 | 0 replies | |
| 11/17 | transport: convert pre-push hook to use configDocumentation/ transport.c | +14 | 0 replies | |
| 12/17 | reference-transaction: look for hooks in configDocumentation/ refs.c t/ | +17 | 0 replies | |
| 13/17 | receive-pack: convert 'update' hook to hook.hDocumentation/ builtin/ t/ | +48 | 0 replies | |
| 14/17 | proc-receive: acquire hook list from hook.hDocumentation/ builtin/ t/ | +82 | 0 replies | |
| 15/17 | post-update: use hook.h libraryDocumentation/ builtin/ | +9 | 0 replies | |
| 16/17 | receive-pack: convert receive hooks to hook.hDocumentation/ builtin/ | +94 | 0 replies | |
| 17/17 | run-command: stop thinking about hookshook.c run-command.c run-command.h | +37 | 0 replies |
Reviews trailers per patch
None of the 17 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Josh Steadmon |
|---|---|
| Series | R-b |
| 1/17 | |
| 2/17 | |
| 3/17 | |
| 4/17 | |
| 5/17 | |
| 6/17 | |
| 7/17 | |
| 8/17 | |
| 9/17 | |
| 10/17 | |
| 11/17 | |
| 12/17 | |
| 13/17 | |
| 14/17 | |
| 15/17 | |
| 16/17 | |
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/17] use config-based hooks (config-based hooks part II)
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
Signature · 1 line
2.28.0.rc0.142.g3c755180ce-goog