Skip to content

Commit

Permalink
Fix checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Feb 9, 2017
1 parent be107ce commit 4ed7034
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contrib/packs/actions/pack_mgmt/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def _clone_repo(temp_dir, repo_url, verifyssl=True, ref='master'):

# Special case when a default repo branch is not "master"
# No ref provided so we just use a default active branch
if not ref and repo.active_branch.object == repo.head.commit and repo.active_branch.name:
if (not ref or ref == active_branch.name) and repo.active_branch.object == repo.head.commit:
gitref = repo.active_branch.object

# Try to match the reference to a branch name (i.e. "master")
gitref = DownloadGitRepoAction._get_gitref(repo, "origin/%s" % ref)
if gitref:
use_branch = True
else:
# Try to match the reference to a branch name (i.e. "master")
gitref = DownloadGitRepoAction._get_gitref(repo, "origin/%s" % ref)
if gitref:
use_branch = True

# Try to match the reference to a commit hash, a tag, or "master"
if not gitref:
Expand Down

0 comments on commit 4ed7034

Please sign in to comment.