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

ci: .shippable.yml: fix commit range #1823

Merged
merged 1 commit into from
Sep 20, 2017

Commits on Sep 20, 2017

  1. ci: .shippable.yml: fix commit range

    When building a pull request, we want to run checkpatch on each commit
    included in the pull request. Unfortunately, it is not what the current
    code does, because $SHIPPABLE_COMMIT_RANGE contains a three-dot
    notation such as: <commit>...<commit>. This syntax is interpreted
    differently depending on the git command that parses it.
    
    Quoting git help diff:
    
      git diff [--options] <commit> <commit> [--] [<path>...]
          This is to view the changes between two arbitrary <commit>.
    
      git diff [--options] <commit>..<commit> [--] [<path>...]
          This is synonymous to the previous form.
    
      git diff [--options] <commit>...<commit> [--] [<path>...]
          This form is to view the changes on the branch containing and up
          to the second <commit>, starting at a common ancestor of both
          <commit>.
    
    Quoting git help revisions (documents the format used by git log or
    git rev-list):
    
       <rev1>..<rev2>
           Include commits that are reachable from <rev2> but exclude those
           that are reachable from <rev1>.
    
       <rev1>...<rev2>
           Include commits that are reachable from either <rev1> or <rev2>
           but exclude those that are reachable from both.
    
    In other words, three dots for git diff is like two dots for git log or
    git rev-list. What we need to use with git rev-list is the two dot
    notation.
    
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
    jforissier committed Sep 20, 2017
    Configuration menu
    Copy the full SHA
    2ed8154 View commit details
    Browse the repository at this point in the history