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

Conversation

jforissier
Copy link
Contributor

@jforissier jforissier commented Sep 20, 2017

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>

@jenswi-linaro
Copy link
Contributor

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

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 jforissier merged commit 23b8cea into OP-TEE:master Sep 20, 2017
@jforissier jforissier deleted the shippable-checkpatch-range branch September 20, 2017 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants