mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
* 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 <naseschwarz@0x53a.de> Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE.md | ||
| README.md | ||
asyncgit
allow using git2 in an asynchronous context
This crate is designed as part of the gitui project.
asyncgit provides the primary interface to interact with git repositories. It is split into the main module and a sync part. The latter provides convenience wrapper for typical usage patterns against git repositories.
The primary goal however is to allow putting certain (potentially) long running git2 calls onto a thread pool.crossbeam-channel is then used to wait for a notification confirming the result.
In gitui this allows the main-thread and therefore the ui to stay responsive.