diff options
author | Emil Velikov <[email protected]> | 2018-11-08 15:05:18 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-11-15 15:57:37 +0000 |
commit | 8b5ce5fa709ec70fa35b4b51f0d7a18a05898f7d (patch) | |
tree | 716f6ff79f84204a69a46dcc3ecb8550d36ef498 /bin | |
parent | cfd333c7686ba955b6b0d47d063279a338866d7b (diff) |
bin/get-pick-list.sh: flesh out is_sha_nomination
Refactor is_fixes_nomination into a is_sha_nomination helper. This way
we can reuse it for more than the usual "Fixes:" tag.
Cc: [email protected]
Reviewed-by: Juan A. Suarez <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
(cherry picked from commit b7418d1f3f102aeed8d3d38195f9b7d672216df0)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/get-pick-list.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh index 05dd3820e12..c456fdb3b81 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` |