Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10455#discussion_r48376752
  
    --- Diff: dev/tests/pr_public_classes.sh ---
    @@ -24,36 +24,44 @@
     #
     # Arg1: The Github Pull Request Actual Commit
     #+ known as `ghprbActualCommit` in `run-tests-jenkins`
    -# Arg2: The SHA1 hash
    -#+ known as `sha1` in `run-tests-jenkins`
    -#
    -
    -# We diff master...$ghprbActualCommit because that gets us changes 
introduced in the PR
    -#+ and not anything else added to master since the PR was branched.
     
     ghprbActualCommit="$1"
    -sha1="$2"
    +
    +# $ghprbActualCommit is an automatic merge commit generated by GitHub; its 
parents are some Spark
    +# master commit and the tip of the pull request branch.
    +
    +# By diffing$ghprbActualCommit^...$ghprbActualCommit and filtering to 
examine the diffs of only
    +# non-test files, we can gets us changes introduced in the PR and not 
anything else added to master
    +# since the PR was branched.
    +
    +# Handle differences between GNU and BSD sed
    +if [[ $(uname) == "Darwin" ]]; then
    +    SED='sed -E'
    +else
    +    SED='sed -r'
    +fi
     
     source_files=$(
    -  git diff master...$ghprbActualCommit --name-only  `# diff patch against 
master from branch point` \
    +  git diff $ghprbActualCommit^...$ghprbActualCommit --name-only  `# diff 
patch against master from branch point` \
         | grep -v -e "\/test"                               `# ignore files in 
test directories` \
         | grep -e "\.py$" -e "\.java$" -e "\.scala$"        `# include only 
code files` \
         | tr "\n" " "
     )
    +
     new_public_classes=$(
    -  git diff master...$ghprbActualCommit ${source_files}      `# diff patch 
against master from branch point` \
    +  git diff $ghprbActualCommit^...$ghprbActualCommit ${source_files}      
`# diff patch against master from branch point` \
    --- End diff --
    
    Huh... I didn't know you could do that.
    
    I was aware of strange hiccups in the old logic but never figured it out. I 
guess this change makes the comment "diff against master from branch point" 
actually true now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to