Skip to content

Commit 651fed4

Browse files
authored
Merge pull request #93 from stackhpc/upstream/yoga-2024-08-05
Synchronise yoga with upstream
2 parents 4e0e9d1 + 398b453 commit 651fed4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tools/check-cherry-picks.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/sh
22
#
33
# A tool to check the cherry-pick hashes from the current git commit message
4-
# to verify that they're all on either master or stable/ branches
4+
# to verify that they're all on either master, stable/ or unmaintained/
5+
# branches
56
#
67

78
commit_hash=""
@@ -14,7 +15,7 @@ if [ $parent_number -eq 2 ]; then
1415
commit_hash=$(git show --format='%P' --quiet | awk '{print $NF}')
1516
fi
1617

17-
if git show --format='%aE' HEAD~ --quiet | grep -qi '[email protected]'; then
18+
if git show --format='%aE' --quiet $commit_hash | grep -qi '[email protected]'; then
1819
echo 'Bot generated change; ignoring'
1920
exit 0
2021
fi
@@ -23,17 +24,17 @@ hashes=$(git show --format='%b' --quiet $commit_hash | sed -nr 's/^.cherry picke
2324
checked=0
2425
branches+=""
2526
for hash in $hashes; do
26-
branch=$(git branch -a --contains "$hash" 2>/dev/null| grep -oE '(master|stable/[a-z0-9.]+)')
27+
branch=$(git branch -a --contains "$hash" 2>/dev/null| grep -oE '(master|stable/[a-z0-9.]+|unmaintained/[a-z0-9.]+)')
2728
if [ $? -ne 0 ]; then
28-
echo "Cherry pick hash $hash not on any master or stable branches"
29+
echo "Cherry pick hash $hash not on any master, stable or unmaintained branches"
2930
exit 1
3031
fi
3132
branches+=" $branch"
3233
checked=$(($checked + 1))
3334
done
3435

3536
if [ $checked -eq 0 ]; then
36-
if ! grep -q '^defaultbranch=stable/' .gitreview; then
37+
if ! grep -qE '^defaultbranch=(stable|unmaintained)/' .gitreview; then
3738
echo "Checked $checked cherry-pick hashes: OK"
3839
exit 0
3940
else

0 commit comments

Comments
 (0)