Skip to content

Commitless repos should be bare #1829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2017

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented May 29, 2017

Only mark a repo as bare if commits are pushed to it, as opposed to if only tags are pushed. Fixes #1706

Also add a sanity check to RepoRef() to avoid potential index-out-of-range error. As far as I can understand, every non-bare repo should have at least one branch, so ctx.Repo.GitRepo.GetBranches() should never actually return an empty slice, but unchecked indices make me nervous.

@ethantkoenig ethantkoenig changed the title No branches Commitless repos should be bare May 29, 2017
@lunny lunny added the type/bug label May 29, 2017
@lunny lunny added this to the 1.2.0 milestone May 29, 2017
@andreynering
Copy link
Contributor

Trusted LGTM

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 12, 2017
@lunny
Copy link
Member

lunny commented Jun 12, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 12, 2017
@andreynering andreynering merged commit 635273c into go-gitea:master Jun 12, 2017
@ethantkoenig ethantkoenig deleted the no_branches branch June 12, 2017 14:05
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 error when browsing a repo where the only commits are tags.
4 participants