Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Local git commit hooks
Date: Sat, 04 Feb 2017 17:11:45
Message-Id: 20170205061105.566edf48@katipo2.lan
1 Does anyone have existing collections of git hooks they use locally on portage
2 to prevent themselves making dumb mistakes?
4 For example, one I just discovered I made back in December was I accidentally
5 keyworded a package for arches I don't have while doing an edit, and I'd imagine
6 the cause was bleed through from when I'd simulated the keyword changes in order
7 to get repoman to locally san-test a keyword request.
9 ( Sadly ironic, the act of locally san-testing keywords created a problem
10 that itself defied the collective san-test )
12 Obviously "New ebuild with these keywords is fine as long as there was one already
13 like that" but "Adding new ebuilds with keywords other ebuilds don't have" should be
14 a significant ACHTUNG!! event, as should be making commits that add keywords to
15 existing ebuilds for arches I don't have.... however, that last one is tricky and
16 needs an escape hatch, because sometimes its entirely justifiable to do that if
17 you're just doing "keyword restoration/spreading". I just need to know I'm doing
18 that when I do that :p
20 I kindof have an idea of how I'd write that, but I'd rather not reinvent the
21 wheel if I don't have to.
23 And there might be other kinds of straight-forward fast checks that I can do
24 like this to avoid making dumb obvious mistakes.