After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686388 - Tests fail with "ERROR: missing pre-commit hook." in jhbuild
Tests fail with "ERROR: missing pre-commit hook." in jhbuild
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.34.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-18 15:16 UTC by Martin Pitt
Modified: 2015-02-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Automatically install pre-commit hook (1.41 KB, patch)
2012-12-18 08:38 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2012-10-18 15:16:35 UTC
When setting up a fresh jhbuild and building GNOME, a --check run regularly fails with

PASS: gthash-test
ERROR: missing pre-commit hook.

copy misc/pre-commit to .git/hooks
make[3]: *** [check-local] Error 1

While this is not hard to fix for someone looking at the logs, or having access to the server, it is rather inconvenient for automated setups and continuous integration servers.

Could the makefile JFDI, i. e. actually copy the file from misc/? As far as I can see it only does local checks, not accessing the network or anything dangerous.

If you agree, I'm happy to provide and test a patch.
Comment 1 Colin Walters 2012-10-27 15:58:36 UTC
Mmm...maybe we should just undo this requirement.  A patch would be good.
Comment 2 Martin Pitt 2012-12-18 08:38:28 UTC
Created attachment 231787 [details] [review]
Automatically install pre-commit hook

I like the pre-commit hook; if we drop the requirement, it just means that the message "please install me" would easily be drowned in the noise of "make check" output.

So this patch takes the "JFDI" route. It works fine from both a pristine checkout as well as an already existing hook. Do you see anything bad with this approach?
Comment 3 Colin Walters 2012-12-18 21:16:32 UTC
Review of attachment 231787 [details] [review]:

Yeah, I think other projects do this too.  Looks OK, thanks!
Comment 4 Martin Pitt 2012-12-18 21:22:23 UTC
Pushed, thanks for reviewing!
Comment 5 André Klapper 2015-02-07 17:01:38 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]