This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/master by this push:
new bf88009 YETUS-789. bugsystem_linecomments_trigger breaks if prevnum
or linenum isn't numeric
bf88009 is described below
commit bf88009eaa17795fac21363c78e3f98e64fbfda0
Author: Allen Wittenauer <[email protected]>
AuthorDate: Fri Feb 1 12:44:51 2019 -0800
YETUS-789. bugsystem_linecomments_trigger breaks if prevnum or linenum
isn't numeric
Signed-off-by: Sean Busbey <[email protected]>
---
precommit/src/main/shell/test-patch.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/precommit/src/main/shell/test-patch.sh
b/precommit/src/main/shell/test-patch.sh
index 52a5579..dd0bae5 100755
--- a/precommit/src/main/shell/test-patch.sh
+++ b/precommit/src/main/shell/test-patch.sh
@@ -2396,6 +2396,16 @@ function bugsystem_linecomments_trigger
text=$(echo "${line}" | cut -f3- -d:)
+ # if, for some reason either one of these
+ # isn't a number, force it to be zero.
+ if [[ ! ${prevnum} =~ ^[0-9]+$ ]]; then
+ prevnum=0
+ fi
+
+ if [[ ! ${linenum} =~ ^[0-9]+$ ]]; then
+ linenum=0
+ fi
+
if [[ "${prevfn}" == "${fn}" ]] &&
[[ ${prevnum} -eq ${linenum} ]]; then
linetext+=("${text}")