~jelmer/brz/gitea

« back to all changes in this revision

Viewing changes to breezy/git/remote.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2021-03-27 16:55:47 UTC
  • mfrom: (7684.1.1 gitlab-create-project-1)
  • Revision ID: breezy.the.bot@gmail.com-20210327165547-re710fyq02zvitd3
Fix GitLab.create_project.

Merged from https://code.launchpad.net/~jelmer/brz/gitlab-create-project-1/+merge/400295

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
            raise AlreadyBranchError(self.user_url)
512
512
        ref_chain, unused_sha = self.get_refs_container().follow(
513
513
            self._get_selected_ref(name))
514
 
        if ref_chain and ref_chain[0] == b'HEAD':
 
514
        if ref_chain and ref_chain[0] == b'HEAD' and len(ref_chain) > 1:
515
515
            refname = ref_chain[1]
516
516
        repo = self.open_repository()
517
517
        return RemoteGitBranch(self, repo, refname)