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

Fix all unit tests without git.Init after #19732 merged, clean code for git < 2.0 after #19577 #19874

Closed
wxiaoguang opened this issue Jun 2, 2022 · 0 comments · Fixed by #19930
Milestone

Comments

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 2, 2022

At the moment, PR #19732 doesn't ensure all unit tests call git.Init correctly.

// at the moment, we just use a temp HomeDir to prevent from conflicting with user's git config
// in future, the git module should be initialized first before use.
HomeDir = filepath.Join(os.TempDir(), "/gitea-temp-home")
log.Warn("Git's HomeDir is empty, the git module is not initialized correctly, using a temp HomeDir (%s) temporarily", HomeDir) 

This issue is here to remind that these unit tests should be fixed after #19732 gets merged.

And one more thing, since Gitea 1.17 has dropped Git<2.0 (#19577), some code might be cleaned, too.

@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Jun 9, 2022
@wxiaoguang wxiaoguang changed the title Fix all unit tests without git.Init after #19732 merged Fix all unit tests without git.Init after #19732 merged, clean code for git < 2.0 Jun 9, 2022
@wxiaoguang wxiaoguang changed the title Fix all unit tests without git.Init after #19732 merged, clean code for git < 2.0 Fix all unit tests without git.Init after #19732 merged, clean code for git < 2.0 after #19577 Jun 9, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant