26 Commits
Author SHA1 Message Date
extrawurst c06235a1d5 bump git2-hooks 2025-12-14 15:01:52 -05:00
xlai89andextrawurst cb17cfe105 feat: support pre-push hooks (#2737)
Co-authored-by: extrawurst <[email protected]>
2025-10-31 08:57:27 +01:00
linkmauveandextrawurst 88ace76db5 Fix typos (#2740)
Thanks to typos for finding those!

Co-authored-by: extrawurst <[email protected]>
2025-10-28 16:35:05 +01:00
linkmauve 26a38183cf Fix all mismatched_lifetime_syntaxes warnings (#2727) 2025-10-28 16:34:42 +01:00
Christoph Rüßler 047f1402de Address clippy issues (#2718) 2025-09-15 16:26:52 -03:00
extrawurst 950e703cab fix nightly ci (#2663) 2025-06-07 23:21:34 +02:00
extrawurst 69fd7e664c bump git2-hooks version 2025-05-26 23:22:26 +02:00
Joshix-1andJohannes Agricola 0e3767102a use gix_path::env::shell() to get the shell in git2-hooks (#2612)
Co-authored-by: Johannes Agricola <[email protected]>
2025-04-16 10:41:14 +02:00
Johannes AgricolaandNaseschwarz 7f88934d05 Bump msrv to 1.81 (#2613)
Co-authored-by: Naseschwarz <[email protected]>
2025-04-16 09:21:06 +02:00
Joshix-1 711210b97b Run git-hooks more correctly (#2483) 2025-04-15 15:01:39 +02:00
7f75307f6e Resolve core.hooksPath relative to GIT_WORK_TREE (#2571)
* Resolve core.hooksPath relative to GIT_WORK_TREE

git supports relative values in core.hooksPath.

`man git-config`:

> A relative path is taken as relative to the directory where the hooks are
> run (see the "DESCRIPTION" section of githooks[5]).

`man githooks`:

> Before Git invokes a hook, it changes its working directory to either
> $GIT_DIR in a bare repository or the root of the working tree in a >
> non-bare repository.

I.e. relative paths in core.hooksPath in non-bare repositories are always
relative to GIT_WORK_TREE.

There is a further exception; I believe this is not considered for path
resolution:

> An exception are hooks triggered during a push (pre-receive, update,
> post-receive, post-update, push-to-checkout) which are always executed
> in $GIT_DIR.

* Favor Repository::workdir() over path().parent()

This more clearly errors in case of bare repositories instead of using
the parent directory of the bare repository.

---------

Co-authored-by: Naseschwarz <[email protected]>
Co-authored-by: extrawurst <[email protected]>
2025-04-04 15:28:44 +02:00
Vasley 4031b0d1a7 Change links to point to gitui-org instead of extrawurst (#2538) 2025-03-16 15:33:28 +01:00
extrawurst d72617f5c2 some cargo upgrades (#2471) 2025-01-10 12:55:30 +01:00
extrawurst d7765c4239 fix doc comments to please new rust version lints 2024-10-18 18:02:02 +02:00
extrawurst f52586885e git2-hooks version bump 2024-09-30 11:24:06 +02:00
Isaac Corbrey d98171b2aa Set CREATE_NO_WINDOW flag when executing Git hooks (#2371) 2024-09-30 11:18:24 +02:00
extrawurst 7ad8265c54 git2-hooks version bump 2024-08-24 12:20:17 +08:00
Yerke Tulibergenov 4cb9500cd9 Use default shell instead of bash on Unix-like OS 2024-08-23 18:57:46 +08:00
extrawurst 6e12c1e974 fix clippy and nightly build 2024-05-16 11:11:05 +02:00
extrawurst 11401872b5 git2-hooks wnaring fixes
and more clippy checks
2024-02-23 18:38:02 +01:00
Anas c629070ea5 fix: fix typos (#2092) 2024-02-21 21:27:33 +01:00
extrawurst 673edd8f2d cargo updates (#1856)
closes #1781
2024-02-12 11:53:22 +01:00
extrawurst e7c61ffc89 Support prepare commit hook (#1978) 2023-12-16 00:07:54 +01:00
extrawurst 521ab91309 git2-hooks: allows customizing what places to look for hooks (#1975)
* allows customizing what places to look for hooks
2023-12-08 14:33:22 +01:00
extrawurst a6416b914d Cleanup hooks (#1972)
* cleanup errors
* cleaner repo structure
* added docs
2023-12-07 17:22:07 +01:00
extrawurst d4dd58f6ca move git hooks support into separate crate (#1971)
* unique error type name
* git2 dependency future 
* return hook out/err separately
2023-12-07 16:28:52 +01:00