Skip to content

refactor: repo counts for SearchRepositoryByName func #1045

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
Feb 25, 2017

Conversation

appleboy
Copy link
Member

No description provided.

@ethantkoenig
Copy link
Member

@appleboy It's not clear to me why this is an improvement. Could you briefly explain why?

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 24, 2017

var countSess xorm.Session
countSess = *sess
count, err := countSess.Count(new(Repository))
Copy link
Member Author

Choose a reason for hiding this comment

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

@ethantkoenig remove countSess session.

@appleboy
Copy link
Member Author

@lunny
Copy link
Member

lunny commented Feb 24, 2017

@ethantkoenig
countSess = *sess is dangous for XORM. I recommend two ways to do that:
One is use builder, another is use func createSession(), but not this one.

@lunny lunny added this to the 1.1.0 milestone Feb 24, 2017
@lunny lunny added type/enhancement An improvement of existing functionality type/bug and removed type/enhancement An improvement of existing functionality labels Feb 24, 2017
@appleboy
Copy link
Member Author

@lunny Thanks for your explanation.

@lunny
Copy link
Member

lunny commented Feb 24, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 24, 2017
@ethantkoenig
Copy link
Member

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 Feb 24, 2017
@lunny lunny merged commit f141214 into go-gitea:master Feb 25, 2017
@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.

4 participants