This commit is contained in:
Jonathan Metzman 2021-01-20 10:18:39 -08:00
parent 453253c427
commit 1647e41bef
1 changed files with 10 additions and 10 deletions

View File

@ -77,16 +77,6 @@ _IMAGE_BUILD_TRIES = 3
_IMAGE_BUILD_BACKOFF = 2
def fix_git_repo_for_diff(repo_dir):
"""Fixes git repos cloned by the "checkout" action so that diffing works on
them."""
command = [
'git', 'symbolic-ref', 'refs/remotes/origin/HEAD',
'refs/remotes/origin/master'
]
return utils.execute(command, location=repo_dir)
def checkout_specified_commit(repo_manager_obj, pr_ref, commit_sha):
"""Checks out the specified commit or pull request using
|repo_manager_obj|."""
@ -112,6 +102,16 @@ def build_external_project_docker_image(project_name, project_src,
return helper.docker_build(command)
def fix_git_repo_for_diff(repo_dir):
"""Fixes git repos cloned by the "checkout" action so that diffing works on
them."""
command = [
'git', 'symbolic-ref', 'refs/remotes/origin/HEAD',
'refs/remotes/origin/master'
]
return utils.execute(command, location=repo_dir)
def check_project_src_path(project_src_path):
"""Returns True if |project_src_path| exists."""
if not os.path.exists(project_src_path):