Skip to content

Commit 157d40a

Browse files
committed
debug: debug
xxx Signed-off-by: raiden00pl <[email protected]>
1 parent 2d678f3 commit 157d40a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tools/checkpatch.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,28 @@ check_patch() {
282282
}
283283

284284
check_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+
# check for Merge line and remove from parsed string
293+
if [[ $first == *Merge* ]]; then
294+
msg="$(echo "$msg" | tail -n +2)"
295+
fi
296+
297+
echo "1------"
298+
echo $msg
299+
echo "2------"
300+
301+
while IFS= read -r REPLY; do
302+
echo "3------"
303+
echo $REPLY
304+
echo "4------"
305+
306+
292307
if [[ $REPLY =~ ^Change-Id ]]; then
293308
echo "Remove Gerrit Change-ID's before submitting upstream"
294309
fail=1
@@ -314,7 +329,7 @@ check_msg() {
314329
fi
315330

316331
((num_lines++))
317-
done
332+
done <<< "$msg"
318333

319334
if ! [[ $first =~ : ]]; then
320335
echo "Commit subject missing colon (e.g. 'subsystem: msg')"

0 commit comments

Comments
 (0)