Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use triple-dot diff YAML in CI #41222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 16, 2024

  1. Use triple-dot diff YAML in CI

    The current diff mechanism in rosdep_repo_check uses a 'bare' diff with
    the configured upstream ref. If the upstream ref contains additional
    commits which are not present in the PR's HEAD which remove lines of
    YAML, this bare diff will report those lines as 'added' when comparing
    the PR to the target, which is certainly not what we want to do.
    
    We can use the git triple-dot notation to compare only commits which are
    present in HEAD but not in target, effectively comparing between the
    PR's HEAD and the merge base with the target branch, instead of the
    target branch directly.
    
    One disadvantage of this approach is that uncommitted changes are no
    longer considered part of the diff. For this reason, I'm only adding the
    triple dot during diffs with the specifically-configured upstream branch
    and not the 'fallback' comparison with origin/master. This way, you can
    still invoke the test locally without the need to commit the changes
    first.
    cottsay committed May 16, 2024
    Configuration menu
    Copy the full SHA
    2a8f0e4 View commit details
    Browse the repository at this point in the history