gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Pre-push hooks seem to be ignored

Open nateridderman opened this issue 2 years ago • 1 comments

Describe the bug When I push changes via gitui, it does not seem to run my repo's pre-push hook

My pre-push hook looks something like: #!/usr/bin/env bash ./gradlew detekt || exit $?

To Reproduce To stage/commit/push some changes via gitui with the aforementioned hook.

Expected behavior When I run "git push" from the command line, my pre-push script is run (and stdout is shown in the terminal) and if it has an error, the push is aborted. For gitui, I would not expect it to show stdout, but the push dialog could have a state indicating that it's running pre-push hooks and waiting for the result.

Screenshots If applicable, add screenshots to help explain your problem.

Context (please complete the following information):

  • macOS 13.4.1
  • GitUI Version 0.24.3
  • Rust version: 1.72.1

nateridderman avatar Oct 19 '23 21:10 nateridderman

yeah pre-push is currently not implemented, should not be too hard: https://git-scm.com/docs/githooks#_pre_push

extrawurst avatar Oct 20 '23 07:10 extrawurst

i have started laying the api out in branch hook-pre-push. happy to guide a contributor through the process of landing this

extrawurst avatar Feb 19 '24 11:02 extrawurst