From: Taylor Blau <me@ttaylorr.com>
To: Emily Shaffer <emilyshaffer@google.com>
Cc: "Honza Prokeš" <proke.j@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git List" <git@vger.kernel.org>
Subject: Re: bug report: pre-push hook
Date: Thu, 24 Mar 2022 17:29:31 -0400 [thread overview]
Message-ID: <Yjziu8nU/SZ7SyH0@nand.local> (raw)
In-Reply-To: <CAJoAoZmo4bJgGdYQeM4XtRJHOpm4z7Gvg=qpUc4xa7Ap=v++UA@mail.gmail.com>
On Thu, Mar 24, 2022 at 11:30:16AM -0700, Emily Shaffer wrote:
> > 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.
I didn't think that we redirected the pre-push (or any) hook's stderr to
stdout in the parent process. I wrote a small pre-push hook which is
just:
$ cat .git/hooks/pre-push
#!/bin/sh
echo >&2 "hi!"
and then:
$ git.compile push ttaylorr --dry-run 2>foo
$ grep hi foo
hi!
But I might be holding it wrong, since I am not a frequent user of
hooks.
Thanks,
Taylor
next prev parent reply other threads:[~2022-03-24 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 16:45 bug report: pre-push hook Honza Prokeš
2022-03-24 18:30 ` Emily Shaffer
2022-03-24 21:29 ` Taylor Blau [this message]
2022-03-24 22:47 ` Emily Shaffer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yjziu8nU/SZ7SyH0@nand.local \
--to=me@ttaylorr.com \
--cc=avarab@gmail.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=proke.j@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox