Feature #486
closed
Support installing git hooks with meson
Added by Anastasia Klimchuk over 1 year ago.
Updated over 1 year ago.
Description
In makefile, git hooks are installed by the gitconfig
target:
gitconfig:
./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh
Meson should also have an option to install git hooks.
The only reference to the gitconfig target I can find is in the development guidelines on the wiki, in the form of instructions to run make gitconfig
to install git hooks.
Rather than attempting to write a meson rule to do the same thing, I think the docs should simply be updated to specify the commands directly; so tell the reader to run
./util/getrevision.sh -c 2>/dev/null && ./util/git-hooks/install.sh
instead of make
.
./util/getrevision.sh is deteled in this patch:
https://review.coreboot.org/c/flashrom/+/72657
What would be the way to install git hooks without it?
Is that
git rev-parse 2>/dev/null && ./util/git-hooks/install.sh
as from the patch?
Just ./util/git-hooks/install.sh
seems fine; I think the use of getrevision.sh
is meant to verify that it's actually being run from inside a git repository, but that seems unnecessary if it's only being run interactively.
Moved things around a little; the wiki has been updated to say to run ./util/git-hooks/install.sh
directly so we can land removal of the make target anytime now. Moving documentation in-tree from the wiki will be a longer process but this change doesn't depend on it.
- Status changed from New to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF