-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Move HasWiki to repository service package #33912
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should stop here.
The design is wrong.
You can't make every function do "for repo" and "for wiki".
Since wiki is also a git repo, it should share the same repo interface as a code repo.
last call @go-gitea/technical-oversight-committee |
Is it possible to have a better design to avoid filling the code base with a lot of |
Maybe we have two options. One is to store the presence of the wiki in the |
For this PR, I do not see why I do not see any feasible plan for the "git repo" related refactoring work. |
This PR will try to make all other packages just depend on the relative path of the repository except gitrepo package. Now the absolute repository path will be used everywhere which will prevent abstract of repository storage. |
I have been tired of your infeasible plans, buggy code and stale PRs. So don't ask me to review. |
Sorry, it's #29033 |
@6543 I see you down-voted my proposal. I don't know how many PRs you have reviewed or helped to improved. For me, the abused errors still occurs today, for example: #31262 (review), #31262 (review). If you don't spend time on helping improving PRs or aren't able to propose a correct framework to resolve these low-level mistakes, I think you can just follow my plan. |
yes but thats off toppic to this specific pull here. i personally realy dislice to use panic and catch them later somewhere and prevere to handle them more explizite. golang allows to ignore that concept easily and otherwhise you have the mentioned boilerplate witch i do understand is not nice either. if somebody has a good proposal i wont downvote etc ... but can we discust this not here ... thats the two reasons i downfoted this instead of just leaving it ... (als offtopic comment) |
If you think it is off-topic, I opened a new one: New web framework design #35378 |
@@ -35,11 +35,3 @@ func TestRepository_WikiPath(t *testing.T) { | |||
expected := filepath.Join(setting.RepoRootPath, "user2/repo1.wiki.git") | |||
assert.Equal(t, expected, repo.WikiPath()) | |||
} | |||
|
|||
func TestRepository_HasWiki(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to repository service package
@6543 @wxiaoguang I pushed a new commit to reduce the error check. |
* main: [skip ci] Updated translations via Crowdin Use github.com/mholt/archives replace github.com/mholt/archiver (go-gitea#35390) Move some functions from package git to gitrepo (go-gitea#33910) Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (go-gitea#35151) Move HasWiki to repository service package (go-gitea#33912) Rename UpdateBranch API to RenameBranch API (go-gitea#35374)
* giteaofficial/main: [skip ci] Updated translations via Crowdin Use github.com/mholt/archives replace github.com/mholt/archiver (go-gitea#35390) Move some functions from package git to gitrepo (go-gitea#33910) Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (go-gitea#35151) Move HasWiki to repository service package (go-gitea#33912) Rename UpdateBranch API to RenameBranch API (go-gitea#35374)
Move HasWiki out of the models package to avoid referencing the absolute wiki path directly.