Project

General

Profile

Actions

Feature #486

closed

Support installing git hooks with meson

Added by Anastasia Klimchuk over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Build system
Target version:
Start date:
04/30/2023
Due date:
% Done:

100%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

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.

Actions #1

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.

Actions #2

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?

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Anastasia Klimchuk over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF