]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
fix unbound local errors 301/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 18 Jan 2016 18:19:06 +0000 (13:19 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 18 Jan 2016 18:19:06 +0000 (13:19 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-pr-commits/build/test_commits.py

index edfa84175f0da221ddb42e6b03418ff51a42fa79..93366742b0cc341e465245a1a1221ec9e01ada7d 100644 (file)
@@ -29,10 +29,10 @@ def run(command):
 
 
 def get_commits():
+    target_branch = os.getenv('ghprbTargetBranch', 'master')
     # 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'
     command = ['git', 'log', '--no-merges', 'origin/%s..%s' % (target_branch, source_branch)]