From: Alfredo Deza Date: Mon, 18 Jan 2016 14:44:59 +0000 (-0500) Subject: fetch origin master before doing a comparison X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F300%2Fhead;p=ceph-build.git fetch origin master before doing a comparison Signed-off-by: Alfredo Deza --- diff --git a/ceph-pr-commits/build/test_commits.py b/ceph-pr-commits/build/test_commits.py index c4a3e0f7..edfa8417 100644 --- a/ceph-pr-commits/build/test_commits.py +++ b/ceph-pr-commits/build/test_commits.py @@ -29,6 +29,9 @@ def run(command): def get_commits(): + # ensure that we have the latest commits from master + command = ['git', 'fetch', 'origin', '+refs/heads/{target_branch}:refs/remotes/origin/{target_branch}'.format(target_branch=target_branch)] + run(command) target_branch = os.getenv('ghprbTargetBranch', 'master') # we use 'HEAD' here because the PR is already checked out on the right branch source_branch = 'HEAD'