Merge pull request !2849 from rhodecode-enterprise-ce feature/git-default-branch
Setting for default branch and creating new repo+commits on empty repo
This commit is contained in:
commit
126269feef
9 changed files with 210 additions and 15 deletions
|
|
@ -1293,7 +1293,7 @@ class RepoFilesView(RepoAppView):
|
|||
|
||||
c.commit = self._get_commit_or_redirect(commit_id, redirect_after=False)
|
||||
if c.commit is None:
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias, branch=self.db_repo.landing_ref_name)
|
||||
|
||||
if self.rhodecode_vcs_repo.is_empty():
|
||||
# for empty repository we cannot check for current branch, we rely on
|
||||
|
|
@ -1329,7 +1329,7 @@ class RepoFilesView(RepoAppView):
|
|||
|
||||
c.commit = self._get_commit_or_redirect(commit_id, redirect_after=False)
|
||||
if c.commit is None:
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias, branch=self.db_repo.landing_ref_name)
|
||||
|
||||
# calculate redirect URL
|
||||
if self.rhodecode_vcs_repo.is_empty():
|
||||
|
|
@ -1415,7 +1415,7 @@ class RepoFilesView(RepoAppView):
|
|||
|
||||
c.commit = self._get_commit_or_redirect(commit_id, redirect_after=False)
|
||||
if c.commit is None:
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias, branch=self.db_repo.landing_ref_name)
|
||||
|
||||
# calculate redirect URL
|
||||
if self.rhodecode_vcs_repo.is_empty():
|
||||
|
|
@ -1517,7 +1517,7 @@ class RepoFilesView(RepoAppView):
|
|||
|
||||
c.commit = self._get_commit_or_redirect(commit_id, redirect_after=False)
|
||||
if c.commit is None:
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias)
|
||||
c.commit = EmptyCommit(alias=self.rhodecode_vcs_repo.alias, branch=self.db_repo.landing_ref_name)
|
||||
|
||||
if self.rhodecode_vcs_repo.is_empty():
|
||||
default_redirect_url = h.route_path("repo_summary", repo_name=self.db_repo_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue