Skip to content

Commit

Permalink
Make sure to pull master and git diff with origin remote rather than …
Browse files Browse the repository at this point in the history
…local
  • Loading branch information
Nicusor Serban committed May 12, 2023
1 parent 7d4853c commit d4c9cca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/org/stan/Utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def verifyChanges(String sourceCodePaths, String mergeWith = "develop") {
else {
sh(script: "git checkout -f ${env.CHANGE_BRANCH}", returnStdout: false)
commitHash = sh(script: "git rev-parse HEAD | tr '\\n' ' '", returnStdout: true)
sh(script: "git checkout -f ${changeTarget}", returnStdout: false)
sh(script: "git checkout -f ${changeTarget} && git pull", returnStdout: false)
sh(script: "git checkout -f ${env.CHANGE_BRANCH}", returnStdout: false)
}

Expand Down Expand Up @@ -150,12 +150,12 @@ def verifyChanges(String sourceCodePaths, String mergeWith = "develop") {
}
}
else{
println "Comparing differences between current ${commitHash} and target ${changeTarget}"
println "Comparing differences between current ${commitHash} and target origin/${changeTarget}"
if (mergeStatus != 0){
differences = sh(script: """
for i in ${sourceCodePaths};
do
git diff ${commitHash} ${changeTarget} -- \$i
git diff ${commitHash} origin/${changeTarget} -- \$i
done
""", returnStdout: true)
}
Expand Down

0 comments on commit d4c9cca

Please sign in to comment.