File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
#
3
3
# 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
5
6
#
6
7
7
8
commit_hash=" "
@@ -18,17 +19,17 @@ hashes=$(git show --format='%b' --quiet $commit_hash | sed -nr 's/^.cherry picke
18
19
checked=0
19
20
branches+=" "
20
21
for hash in $hashes ; do
21
- branch=$( git branch -a --contains " $hash " 2> /dev/null| grep -oE ' (master|stable/[a-z0-9.]+)' )
22
+ branch=$( git branch -a --contains " $hash " 2> /dev/null| grep -oE ' (master|stable/[a-z0-9.]+|unmaintained/[a-z0-9.]+ )' )
22
23
if [ $? -ne 0 ]; then
23
- echo " Cherry pick hash $hash not on any master or stable branches"
24
+ echo " Cherry pick hash $hash not on any master, stable or unmaintained branches"
24
25
exit 1
25
26
fi
26
27
branches+=" $branch "
27
28
checked=$(( $checked + 1 ))
28
29
done
29
30
30
31
if [ $checked -eq 0 ]; then
31
- if ! grep -q ' ^defaultbranch=stable/' .gitreview; then
32
+ if ! grep -qE ' ^defaultbranch=( stable|unmaintained) /' .gitreview; then
32
33
echo " Checked $checked cherry-pick hashes: OK"
33
34
exit 0
34
35
else
You can’t perform that action at this time.
0 commit comments