Page MenuHomeFreeBSD

D35042.id105366.diff
No OneTemporary

D35042.id105366.diff

Index: .hooks/pre-commit.d/check_moved
===================================================================
--- /dev/null
+++ .hooks/pre-commit.d/check_moved
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Check that added MOVED lines follow the proper scheme
+#
+
+moved_changed=$(git diff --name-only --cached --diff-filter=M | grep -E '^MOVED$')
+if [ $? -eq 0 ] ; then
+ # * only check the lines that are added, there should not be an error when fixing broken lines
+ # * each line is checked against
+ # port|new_port?|yyyy-mm-dd|reason
+ broken_lines=$( git diff -U0 --cached MOVED | \
+ grep '^\+[^+]' | \
+ sed 's|^\+\([^+].*$\)|\1|' | \
+ grep -v '^([^\/]+\/[^\/]+)\|([^\/]+\/[^\/]+)?\|([0-9]{4}-[0-9]{2}-[0-9]{2})\|([^\|]+)$')
+ if [ $? -eq 0 ] ; then
+ echo "[pre-commit] ERROR: MOVED lines:"
+ echo "${broken_lines}"
+ echo "is/are invalid -- please run Tools/scripts/MOVEDlint.awk"
+ exit 1
+ fi
+fi

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 9, 9:33 PM (5 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40504986
Default Alt Text
D35042.id105366.diff (912 B)

Event Timeline