aw-was-here commented on a change in pull request #96: YETUS-949. remove empty 
filenames in find_changed_files
URL: https://github.com/apache/yetus/pull/96#discussion_r385997187
 
 

 ##########
 File path: precommit/src/main/shell/core.d/change-analysis.sh
 ##########
 @@ -68,7 +68,9 @@ function find_changed_files
       # Additionally, remove any a/ b/ patterns at the front of the patch 
filenames.
       # shellcheck disable=SC2016
       while read -r line; do
-        CHANGED_FILES=("${CHANGED_FILES[@]}" "${line}")
+        if [[ -n "${line}" ]]; then
+          CHANGED_FILES=("${CHANGED_FILES[@]}" "${line}")
+        fi
       done < <(
         "${AWK}" 'function p(s){sub("^[ab]/","",s); if(s!~"^/dev/null"){print 
s}}
 
 Review comment:
   Awesome! Thanks.  Found another place where this awk construction is used so 
updated it too.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to