Skip to content

Manage port in submodule refurl#11305

Merged
guillep2k merged 9 commits into
go-gitea:masterfrom
zeripath:fix-11304-add-port
May 7, 2020
Merged

Manage port in submodule refurl#11305
guillep2k merged 9 commits into
go-gitea:masterfrom
zeripath:fix-11304-add-port

Conversation

@zeripath
Copy link
Copy Markdown
Contributor

@zeripath zeripath commented May 5, 2020

Fix #11304

Signed-off-by: Andrew Thornton art27@cantab.net

Fix go-gitea#11304

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 5, 2020
@guillep2k
Copy link
Copy Markdown
Member

guillep2k commented May 5, 2020

Very strange error on golangci-lint. 🤔

ERRO Running error: context loading failed: failed to load program with go/packages: internal error: go list gives conflicting information for package code.gitea.io/gitea/modules/git [code.gitea.io/gitea/modules/git.test]

@guillep2k
Copy link
Copy Markdown
Member

Can reproduce in my setup! Doesn't happen on master (golangci-lint 1.24.0).

@guillep2k
Copy link
Copy Markdown
Member

Oh, it's an import cycle:

import cycle not allowed
package code.gitea.io/gitea
        imports code.gitea.io/gitea/cmd
        imports code.gitea.io/gitea/models
        imports code.gitea.io/gitea/modules/auth/oauth2
        imports code.gitea.io/gitea/modules/setting
        imports code.gitea.io/gitea/modules/git
        imports code.gitea.io/gitea/modules/util
        imports code.gitea.io/gitea/modules/setting

😕

@guillep2k
Copy link
Copy Markdown
Member

guillep2k commented May 6, 2020

I think util.IsExternalURL() should probably be moved out of util. Maybe even move it to setting. base is a good option as well, because it already imports setting.

@zeripath
Copy link
Copy Markdown
Contributor Author

zeripath commented May 6, 2020

Ugh

@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 May 7, 2020
@guillep2k guillep2k merged commit 71e73db into go-gitea:master May 7, 2020
@zeripath zeripath deleted the fix-11304-add-port branch May 7, 2020 14:26
zeripath added a commit to zeripath/gitea that referenced this pull request May 7, 2020
* Manage port in submodule refurl

Fix go-gitea#11304

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Protect against leading .. in scp syntax

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 7, 2020
jolheiser pushed a commit that referenced this pull request May 7, 2020
* Manage port in submodule refurl

Fix #11304

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Protect against leading .. in scp syntax

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>

Co-authored-by: Lauris BH <lauris@nix.lv>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Manage port in submodule refurl

Fix go-gitea#11304

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Protect against leading .. in scp syntax

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
@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

backport/done All backports for this PR have been created 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.

Submodule listings do not use full URL (missing port) with gitea in docker

5 participants