]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
fetch origin master before doing a comparison 300/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 18 Jan 2016 14:44:59 +0000 (09:44 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 18 Jan 2016 14:44:59 +0000 (09:44 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-pr-commits/build/test_commits.py

index c4a3e0f727284236da1684a14b10ba11c500c554..edfa84175f0da221ddb42e6b03418ff51a42fa79 100644 (file)
@@ -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'