def _get_ref(repo, name):
 if (name == 'base'):
  name = repo['base']
 if ((name == repo['base']) or (name in envs())):
  if (repo['branch_method'] == 'branches'):
   return (_get_branch(repo['repo'], name) or _get_tag(repo['repo'], name))
  elif (repo['branch_method'] == 'bookmarks'):
   return (_get_bookmark(repo['repo'], name) or _get_tag(repo['repo'], name))
  elif (repo['branch_method'] == 'mixed'):
   return (_get_branch(repo['repo'], name) or _get_bookmark(repo['repo'], name) or _get_tag(repo['repo'], name))
 return False

def _get_ref ( repo , name ) : if ( name == 'base' ) : name = repo [ 'base' ] if ( ( name == repo [ 'base' ] ) or ( name in envs ( ) ) ) : if ( repo [ 'branch_method' ] == 'branches' ) : return ( _get_branch ( repo [ 'repo' ] , name ) or _get_tag ( repo [ 'repo' ] , name ) ) elif ( repo [ 'branch_method' ] == 'bookmarks' ) : return ( _get_bookmark ( repo [ 'repo' ] , name ) or _get_tag ( repo [ 'repo' ] , name ) ) elif ( repo [ 'branch_method' ] == 'mixed' ) : return ( _get_branch ( repo [ 'repo' ] , name ) or _get_bookmark ( repo [ 'repo' ] , name ) or _get_tag ( repo [ 'repo' ] , name ) ) return False
return ref tuple if ref is in the repo .