From: Emil Velikov <emil.veli...@collabora.com> Refactor is_fixes_nomination into a is_sha_nomination helper. This way we can reuse it for more than the usual "Fixes:" tag.
Signed-off-by: Emil Velikov <emil.veli...@collabora.com> --- bin/get-pick-list.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh index 8f32b284128..1aeb64fe889 100755 --- a/bin/get-pick-list.sh +++ b/bin/get-pick-list.sh @@ -21,10 +21,12 @@ is_typod_nomination() git show --summary "$1" | grep -q -i -o "CC:.*mesa-dev" } -is_fixes_nomination() +# Helper to handle various mistypos of the fixes tag. +# The tag string itself is passed as argument and normalised within. +is_sha_nomination() { fixes=`git show --pretty=medium -s $1 | tr -d "\n" | \ - sed -e 's/fixes:[[:space:]]*/\nfixes:/Ig' | \ + sed -e 's/'"$2"'/\nfixes:/Ig' | \ grep -Eo 'fixes:[a-f0-9]{8,40}'` fixes_count=`echo "$fixes" | wc -l` @@ -55,6 +57,11 @@ is_fixes_nomination() return 1 } +is_fixes_nomination() +{ + is_sha_nomination "$1" "fixes:[[:space:]]*" +} + # Use the last branchpoint as our limit for the search latest_branchpoint=`git merge-base origin/master HEAD` -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev