Skip to content

Pre-commit hooks are executed only when launched from the git root #2281

Closed
@savchenko

Description

@savchenko

Describe the bug
Pre-commit hook is ignored.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir .githooks && git config --local core.hooksPath .githooks
  2. Create .githooks/pre-commit with echo "Hook triggered" && exit 1 and chmod +x it.
  3. git commit now fails, as expected.
  4. gitui ignores the hook.

Expected behavior
pre-commit behaviour is the same when using git CLI.

Screenshots
N/A.

Context (please complete the following information):

  • OS/Distro + Version: Debian 12
  • GitUI Version: gitui 0.25.2
  • Rust version: rustc 1.76.0

Additional context
Relates to:

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions