-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refactor models.NewRepoContext to extract git related codes to modules/git #6941
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6941 +/- ##
==========================================
+ Coverage 41.39% 41.41% +0.01%
==========================================
Files 441 441
Lines 59732 59718 -14
==========================================
+ Hits 24729 24730 +1
+ Misses 31764 31753 -11
+ Partials 3239 3235 -4
Continue to review full report at Codecov.
|
routers/admin/admin.go
Outdated
@@ -210,7 +211,8 @@ func Config(ctx *context.Context) { | |||
ctx.Data["DisableRouterLog"] = setting.DisableRouterLog | |||
ctx.Data["RunUser"] = setting.RunUser | |||
ctx.Data["RunMode"] = strings.Title(macaron.Env) | |||
ctx.Data["GitVersion"] = setting.Git.Version | |||
ver, _ := git.BinVersion() | |||
ctx.Data["GitVersion"] = ver |
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 you could do this in one line.
b2392d5
to
551b500
Compare
@@ -931,6 +932,8 @@ func NewContext() { | |||
sec = Cfg.Section("U2F") | |||
U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/"))) | |||
U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/")) | |||
|
|||
zip.Verbose = false |
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.
Do we still need this? I'm not sure we use cae/zip elsewhere.
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.
Don't know. Since this is a refactor PR, I just keep it.
…s/git (go-gitea#6941) * refactor models.NewRepoContext to extract git related codes to modules/git * fix imports * refactor
As title.