File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -282,13 +282,40 @@ check_patch() {
282282}
283283
284284check_msg () {
285- first=$( head -n1 <<< " $msg" )
286285 signedoffby_found=0
287286 num_lines=0
288287 max_line_len=72
289288 min_num_lines=5
290289
291- while read ; do
290+ first=$( head -n1 <<< " $msg" )
291+
292+ echo " x------"
293+ echo $first
294+ echo " y------"
295+
296+ # check for Merge line and remove from parsed string
297+ if [[ $first == * Merge* ]]; then
298+ msg=" $( echo " $msg " | tail -n +2) "
299+ first=$( head -n2 <<< " $msg" )
300+ fi
301+
302+ echo " q------"
303+ echo $first
304+ echo " w------"
305+
306+
307+ echo " 1------"
308+ echo $msg
309+ echo " 2------"
310+ echo
311+ echo
312+
313+ while IFS= read -r REPLY; do
314+ echo " 3------"
315+ echo $REPLY
316+ echo " 4------"
317+
318+
292319 if [[ $REPLY =~ ^Change-Id ]]; then
293320 echo " Remove Gerrit Change-ID's before submitting upstream"
294321 fail=1
@@ -314,7 +341,7 @@ check_msg() {
314341 fi
315342
316343 (( num_lines++ ))
317- done
344+ done <<< " $msg "
318345
319346 if ! [[ $first =~ : ]]; then
320347 echo " Commit subject missing colon (e.g. 'subsystem: msg')"
You can’t perform that action at this time.
0 commit comments