From: Andreas Dilger Date: Sat, 4 Mar 2017 05:27:32 +0000 (-0700) Subject: LU-3434 scripts: check for mdsfilesystemtype= option X-Git-Tag: 2.9.56~16 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1b75e853af52ab99b831d32b828a38dd446b61b5;hp=e0850b31ccd5597b564d4385a424bfa6be6f2f3e LU-3434 scripts: check for mdsfilesystemtype= option Check if the Test-Parameters line is using the old mdsfilesystemtype= option and ask for it to be removed. The mdtfilesystemtype= option should be used instead. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I52765fd94f4dec896593c86763737fa64f3ebbe5 Reviewed-on: https://review.whamcloud.com/25804 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Charlie Olmstead Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/contrib/git-hooks/commit-msg b/contrib/git-hooks/commit-msg index 25a6281..d28e40b 100755 --- a/contrib/git-hooks/commit-msg +++ b/contrib/git-hooks/commit-msg @@ -99,6 +99,13 @@ function do_changeid() { HAS_CHANGEID=true } +function do_testparams() { + ck_wrapup + + grep -q mdsfilesystemtype <<< $LINE && + error "mdsfilesystemtype is deprecated, use mdtfilesystemtype" +} + # All "innocuous" lines specify a person and email address # function do_innocuous() { @@ -215,9 +222,9 @@ exec 3< "$ORIGINAL" 4> "$REVISED" || exit 1 while IFS= read -u3 LINE; do ((NUM += 1)) case "$LINE" in - $SIGNOFF* ) do_signoff ;; - $CHANGEID* ) do_changeid ;; - $TESTPARAMS* ) ck_wrapup ;; + $SIGNOFF* ) do_signoff ;; + $CHANGEID* ) do_changeid ;; + $TESTPARAMS* ) do_testparams ;; "") HAS_LAST_BLANK=true diff --git a/contrib/git-hooks/tests/commit.mdsfst b/contrib/git-hooks/tests/commit.mdsfst new file mode 100644 index 0000000..4f2fd90 --- /dev/null +++ b/contrib/git-hooks/tests/commit.mdsfst @@ -0,0 +1,8 @@ +DCO-5866 scripts: check for mdsfilesystemtype + +Check if the Test-Parameters line is using the old mdsfilesystemtype= +option and ask for it to be removed. The mdtfilesystemtype= option +should be used instead. + +Test-Parameters: trivial mdsfilesystemtype=zfs +Signed-off-by: Andreas Dilger