Feature #486
closedSupport installing git hooks with meson
100%
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.
Updated by Peter Marheine over 1 year ago
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
.
Updated by Anastasia Klimchuk over 1 year ago
./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?
Updated by Peter Marheine over 1 year ago
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.
Updated by Peter Marheine over 1 year ago
https://review.coreboot.org/c/flashrom/+/74924/ updates documentation (which I've move in-tree from the wiki) and deletes the make gitconfig
target.
Updated by Peter Marheine over 1 year ago
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.
Updated by Anastasia Klimchuk over 1 year ago
- Status changed from New to Resolved
- % Done changed from 0 to 100