exit 0
fi
+# This should be a git tree that contains *only* Linus' tree
Linus_tree="${HOME}/kernels/linus.git"
-done_file="${HOME}/tmp/check_fixes_done"
split_re='^([[:xdigit:]]+)[[:space:]]+(.*)$'
nl=$'\n'
}
for c in $commits; do
- if [ -r "$done_file" ] && grep -q -Fx "$c" "$done_file"; then
- continue
- fi
- commit_msg="In commit
+ commit_log=$(git log -1 --format='%h ("%s")' "$c")
+ commit_msg=$(printf 'In commit\n\n %s\n\n' "$commit_log")
- $(git log -1 --format='%h ("%s")' $c)
-
-"
fixes_lines=$(git log -1 --format='%B' "$c" |
grep -i '^[[:space:]]*Fixes:')
- while read fline; do
+ while read -r fline; do
f=$(echo "$fline" | sed 's/^[[:space:]]*Fixes:[[:space:]]*//i')
- fixes_msg="Fixes tag
-
- $fline
-
-has these problem(s):
-
-"
+ fixes_msg=$(printf 'Fixes tag\n\n %s\n\n has these problem(s):\n\n' "$fline")
sha=
subject=
msg=
if [ "$subject" != "${target_subject:0:${#subject}}" ]; then
msg="${msg:+${msg}${nl}} - Subject does not match target commit subject"
fi
- lsha=$(cd $Linus_tree; git rev-parse -q --verify "$sha")
+ lsha=$(cd "$Linus_tree" && git rev-parse -q --verify "$sha")
if [ -z "$lsha" ]; then
count=$(git rev-list --count "$sha".."$c")
if [ "$count" -eq 0 ]; then