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

Replace list.List with slices #16311

Merged
merged 13 commits into from
Aug 9, 2021
Merged

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Jun 30, 2021

This PR replaces all list.Lists with typed slices. There was not a single place where a linked list has advantages.

For

func commitBranchCheck(gitRepo *git.Repository, startCommit *git.Commit, endCommitID, baseBranch string, commitList map[string]commitBranchCheckItem) (err error) {
I'm not sure if the LIFO list was important but I don't think so.

@KN4CK3R KN4CK3R added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jun 30, 2021
@6543 6543 added this to the 1.16.0 milestone Jun 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2021

Codecov Report

Merging #16311 (32f8cfb) into main (eaa791b) will decrease coverage by 0.02%.
The diff coverage is 80.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16311      +/-   ##
==========================================
- Coverage   45.39%   45.37%   -0.03%     
==========================================
  Files         756      757       +1     
  Lines       85279    85194      -85     
==========================================
- Hits        38712    38656      -56     
+ Misses      40305    40279      -26     
+ Partials     6262     6259       -3     
Impacted Files Coverage Δ
modules/templates/helper.go 51.54% <ø> (-0.54%) ⬇️
routers/web/repo/blame.go 0.00% <0.00%> (ø)
routers/web/repo/wiki.go 41.62% <0.00%> (+0.20%) ⬆️
services/mirror/mirror_pull.go 32.74% <0.00%> (ø)
services/pull/pull.go 42.19% <64.28%> (+0.45%) ⬆️
modules/git/repo_commit.go 42.35% <72.22%> (-0.26%) ⬇️
routers/web/repo/commit.go 27.62% <75.00%> (-1.33%) ⬇️
modules/git/commit.go 60.00% <80.00%> (ø)
models/issue_comment.go 51.40% <83.33%> (-1.18%) ⬇️
routers/web/repo/pull.go 30.02% <85.71%> (-0.31%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dc41c4...32f8cfb. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 22, 2021
@GiteaBot GiteaBot 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 Jul 23, 2021
@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 Aug 9, 2021
@techknowlogick techknowlogick merged commit d9ef43a into go-gitea:main Aug 9, 2021
@KN4CK3R KN4CK3R deleted the refactor-list branch August 12, 2021 14:27
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants