summaryrefslogtreecommitdiff
path: root/.hooks
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2022-12-17 00:40:34 +0100
committerMatthias Andree <mandree@FreeBSD.org>2022-12-17 00:42:36 +0100
commitdf32a2be1da47432c17e4424c3482a23aade7d9c (patch)
tree71774f5ff39b3acf46fd2907ecab34722ad09217 /.hooks
parentmultimedia/plexmediaserver: Update to 1.30.0.6486 (diff)
.hooks/pre-commit.d: Revert "unbreak EPOCH checker"
This reverts commit e0dd1e987a5eaa27cf7b46043db663ff51b1cdc2. No consensus yet, and escaped after messing up my branches.
Diffstat (limited to '.hooks')
-rwxr-xr-x.hooks/pre-commit.d/check_portepoch6
1 files changed, 3 insertions, 3 deletions
diff --git a/.hooks/pre-commit.d/check_portepoch b/.hooks/pre-commit.d/check_portepoch
index 34d93e2efcf4..1a59a39b5407 100755
--- a/.hooks/pre-commit.d/check_portepoch
+++ b/.hooks/pre-commit.d/check_portepoch
@@ -5,9 +5,9 @@
check_epoch() {
local makefile="$1"
- local old_epoch=$(git diff --cached -U0 "${makefile}" | grep '^-PORTEPOCH.*=' | grep -oE '[0-9]+')
- local new_epoch=$(git diff --cached -U0 "${makefile}" | grep '^+PORTEPOCH.*=' | grep -oE '[0-9]+')
- if [ -z "${new_epoch}" -a -n "${old_epoch}" ] ; then
+ local old_epoch=$(git diff --cached -U0 "${makefile}" | grep '^\-PORTEPOCH' | grep -oE '[0-9]+')
+ local new_epoch=$(git diff --cached -U0 "${makefile}" | grep '^\+PORTEPOCH' | grep -oE '[0-9]+')
+ if [ -z "${new_epoch}" ] ; then
echo "[pre-commit] dropped PORTEPOCH ${old_epoch} in ${makefile}"
exit 1
fi