Skip to content
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

Don't consider tag refs as valid for branch name #11847

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 10, 2020

name-rev does not discriminate so we need to explicitly ensure that tags won't be taken into account

@lafriks lafriks added this to the 1.13.0 milestone Jun 10, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 10, 2020
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I umm'd and ahh'd about this one and whether we should be stricter to the point of using --refs refs/head/* instead but I guess this way we get to keep the refs/pulls/x/head references etc.

@GiteaBot GiteaBot 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 10, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 10, 2020

Yes it's a rather ugly case.

Maybe treat pulls in special fashion, with different icon and display them separately?

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 10, 2020

The issue is however - I'm not sure if we can remove pull refs from that function because of usage in getCommitIDsFromRepo

@zeripath
Copy link
Contributor

Exactly I think this is the minimal fix that doesn't break things (further) and fixes the tag problem. I suspect that the other cases are not bad things to show eg. If using git-as-svn then SVN commit refs should show up too

@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit 4a4977a into go-gitea:master Jun 10, 2020
@CirnoT CirnoT deleted the branch_name-tag branch June 11, 2020 07:08
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 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.

5 participants