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 run web with -p push failed #3154

Merged
merged 2 commits into from Dec 13, 2017
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Dec 11, 2017

Will fix #2952

@lunny lunny added this to the 1.4.0 milestone Dec 11, 2017
@codecov-io
Copy link

codecov-io commented Dec 11, 2017

Codecov Report

Merging #3154 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3154      +/-   ##
==========================================
- Coverage   34.77%   34.71%   -0.07%     
==========================================
  Files         276      276              
  Lines       39946    39970      +24     
==========================================
- Hits        13893    13874      -19     
- Misses      24057    24100      +43     
  Partials     1996     1996
Impacted Files Coverage Δ
cmd/web.go 0% <0%> (ø) ⬆️
modules/indexer/repo.go 60.86% <0%> (-6.96%) ⬇️
models/repo_indexer.go 50.97% <0%> (-2.92%) ⬇️
models/repo_list.go 65.62% <0%> (-1.57%) ⬇️
models/repo.go 41.28% <0%> (-0.19%) ⬇️

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 0b77dbc...79f0f4d. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 11, 2017
@@ -69,6 +71,34 @@ func runWeb(ctx *cli.Context) error {
if ctx.IsSet("port") {
setting.AppURL = strings.Replace(setting.AppURL, setting.HTTPPort, ctx.String("port"), 1)
setting.HTTPPort = ctx.String("port")

switch setting.Protocol {
case setting.UnixSocket:
Copy link
Member

Choose a reason for hiding this comment

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

This will not work for unix sockets and FCGI (see NewContext in setting.go).
As being so close to that functionality as in NewContext, can this formatting be moved out to some common place so that it could be reused in both places?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lafriks, for unix sockets and FCGI, the port changed will not be effected, so ignored them. Currently only this place need the code and there is no other place need it.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry it was late and forgot about golang cases not being fall through by default :)

@lafriks
Copy link
Member

lafriks commented Dec 12, 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 Dec 12, 2017
@strk
Copy link
Member

strk commented Dec 13, 2017

Trusted 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 Dec 13, 2017
@lunny lunny merged commit 00bfa1d into go-gitea:master Dec 13, 2017
@lunny lunny deleted the lunny/fix_run_web_port branch December 13, 2017 08:57
lunny added a commit to lunny/gitea that referenced this pull request Dec 13, 2017
lunny added a commit that referenced this pull request Dec 13, 2017
@lafriks lafriks added the backport/done All backports for this PR have been created label Dec 13, 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
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.

! [remote rejected] master -> master (pre-receive hook declined)
5 participants