Module: Mesa
Branch: staging/18.3
Commit: cfd333c7686ba955b6b0d47d063279a338866d7b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfd333c7686ba955b6b0d47d063279a338866d7b

Author: Emil Velikov <[email protected]>
Date:   Thu Nov  8 15:05:17 2018 +0000

bin/get-pick-list.sh: tweak the commit sha matching pattern

Currently we match on:
 - any arbitrary length of,
 - any a-z A-Z and 0-9 characters

At the same time, a commit sha consists of lowercase hexadecimal
numbers. Any sha shorter than 8 characters is ambiguous - in some cases
even 11+ are required.

So change the pattern to a-f0-9 and adjust the length to 8-40.

As we're here we could use a single grep, instead of the grep/sed combo.

Cc: [email protected]
Reviewed-by: Juan A. Suarez <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
(cherry picked from commit 533fead4236459c3f04700ff130ffaee1503cb69)

---

 bin/get-pick-list.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/get-pick-list.sh b/bin/get-pick-list.sh
index c1f2bf11ca..05dd3820e1 100755
--- a/bin/get-pick-list.sh
+++ b/bin/get-pick-list.sh
@@ -25,7 +25,7 @@ is_fixes_nomination()
 {
        fixes=`git show --pretty=medium -s $1 | tr -d "\n" | \
                sed -e 's/fixes:[[:space:]]*/\nfixes:/Ig' | \
-               grep "fixes:" | sed -e 's/\(fixes:[a-zA-Z0-9]*\).*$/\1/'`
+               grep -Eo 'fixes:[a-f0-9]{8,40}'`
 
        fixes_count=`echo "$fixes" | wc -l`
        if [ $fixes_count -eq 0 ] ; then

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to