.hooks/pre-commit.d: Revert "unbreak EPOCH checker"
This reverts commit e0dd1e987a5eaa27cf7b46043db663ff51b1cdc2. No consensus yet, and escaped after messing up my branches.
This commit is contained in:
parent
c55643fb1b
commit
df32a2be1d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user