File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ commit_hash=$(git rev-parse HEAD)
19
19
parent_count=$( git log --pretty=%P -n 1 $commit_hash | wc -w)
20
20
if [ $parent_count -eq 1 ]; then # no new commits in main branch
21
21
newcommit=$commit_hash
22
- oldcommit=$( git merge-base ${newcommit} main)
22
+ oldcommit=$( git merge-base ${newcommit} mainrepo/ main)
23
23
if [ -z $oldcommit ]; then echo " Cannot find merge-base commit" && exit 1; fi
24
24
echo " Found merge-base commit: $oldcommit "
25
25
git diff $oldcommit $newcommit --name-only > $ROOT_DIR /coverage/gitdiff.txt 2> /dev/null || echo " error can be ignored"
@@ -39,7 +39,7 @@ else #has new commits in main branch
39
39
fi
40
40
41
41
cd $ROOT_DIR
42
- cat coverage/gitdiff.txt | egrep ' \.(cpp|hpp|h )$' | grep " $include /" > coverage/gitdiff_screen.txt || true
42
+ cat coverage/gitdiff.txt | egrep ' \.(cpp|hpp)$' | grep " $include /" > coverage/gitdiff_screen.txt || true
43
43
if [ ! -s coverage/gitdiff_screen.txt ]; then echo " No C/C++ in incremental code" && exit 0; fi
44
44
rm -rf coverage/gitdiff.txt
45
45
while IFS= read -r line; do
You can’t perform that action at this time.
0 commit comments