From 7cf134c73d043e1adc1ac6361b202afa0d0f4ca9 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 11 Mar 2011 19:26:07 -0500 Subject: [PATCH 1/3] [ticket/10092] Ignore overlength comment lines in commit-msg hook. PHPBB3-10092 --- git-tools/hooks/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index ad4d69a9da..6d4f02a1d2 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -66,7 +66,7 @@ then exit 0 fi -msg=$(grep -nE '.{81,}' "$1"); +msg=$(grep -v '^#' "$1" |grep -nE '.{81,}') if [ $? -eq 0 ] then From 94e09ac041ac7bc9fd52c8bd1d13d1a91da1da6f Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 11 Mar 2011 19:27:38 -0500 Subject: [PATCH 2/3] [ticket/10078] Avoid \n in strings given to echo for portability. Also preserve whitespace (including newlines) when printing the lines that exceed 80 character limit. PHPBB3-10078 --- git-tools/hooks/commit-msg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index ad4d69a9da..9114cd368a 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -70,8 +70,9 @@ msg=$(grep -nE '.{81,}' "$1"); if [ $? -eq 0 ] then - echo "The following lines are greater than 80 characters long:\n" >&2; - echo $msg >&2; + echo "The following lines are greater than 80 characters long:" >&2; + echo >&2 + echo "$msg" >&2; quit $ERR_LENGTH; fi From 64657ee366f3d7f7e78129cda0e6cfc1ae36d4c3 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sun, 13 Mar 2011 23:11:33 -0400 Subject: [PATCH 3/3] [ticket/10096] Fixed whitespace in functions.php. PHPBB3-10096 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 80b51f80ae..2fc7ca6903 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4261,7 +4261,7 @@ function phpbb_http_login($param) if (!is_null($username) && is_null($password) && strpos($username, 'Basic ') === 0) { list($username, $password) = explode(':', base64_decode(substr($username, 6)), 2); - } + } if (!is_null($username) && !is_null($password)) {