Skip to content

Commit 4891e51

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

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

tools/checkpatch.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,40 @@ 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+
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')"

0 commit comments

Comments
 (0)