On Thu, Mar 24, 2022 at 9:45 AM Honza Prokeš <proke.j@xxxxxxxxx> wrote: > > Thank you for filling out a Git bug report! > Please answer the following questions to help us understand your issue. > > What did you do before the bug happened? (Steps to reproduce your issue) > I did setup pre-push hook to run unit tests. > > What did you expect to happen? (Expected behavior) > Pre-push executes tests, I can see output, and if tests fail, push > does not happen. > > What happened instead? (Actual behavior) > Tests seem to execute on the background, but I do not see output I wonder - are you printing your test output to stdout, or stderr? stderr of the hook is printed to stdout of the Git process, so that may be why. > and > push happens when tests fail. This part I am a little less sure about, especially without seeing your hook script - but perhaps getting the output thing figured out first will help figure out this part? > > What's different between what you expected and what actually happened? > As above, so: > Tests seem to execute on the background, but I do not see output and > push happens when tests fail. > > Anything else you want to add: > When I run pre-push script directly from terminal, it executes tests, > I see output and if I ask for last command exit-code, it is non-zero > if tests fail, so my script is functional. It was working until > recently, noticed today, but this behavior happened at least two days > ago. Oh, interesting! There has been a bit of hook-handling backend work going on lately (ccing Ævar who has been more actively working on it than me) so it's possible it's a regression, although we do have tests covering pre-push hook in t/t5571-pre-push-hook.sh; I see that those tests cover nonzero exit, but it doesn't look like they cover output capturing (the test hooks are cat-ing to a file, rather than trying to print their own output). Any chance that you can provide a minified version of your pre-push hook that reliably tries to fail and doesn't prevent push from happening? That would help a lot to track down the issue. > It was working well in past. My fella has the same issue with > similar script on up-to-date Arch Linux. > > [System Info] > git version: > git version 2.35.1 Would also be nice to know, if you happen to know, what version you used before when it worked nicely. But if you don't happen to have that handy then don't worry about it. - Emily