mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-03-05 23:53:20 +01:00
Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
780e858d5c
commit
f345b4c9df
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ func VersionInfo() string {
|
||||||
|
|
||||||
func checkInit() error {
|
func checkInit() error {
|
||||||
if setting.Git.HomePath == "" {
|
if setting.Git.HomePath == "" {
|
||||||
return errors.New("can not init Git's HomeDir, the setting and git modules are not initialized correctly")
|
return errors.New("unable to init Git's HomeDir, incorrect initialization of the setting and git modules")
|
||||||
}
|
}
|
||||||
if DefaultContext != nil {
|
if DefaultContext != nil {
|
||||||
log.Warn("git module has been initialized already, duplicate init should be fixed")
|
log.Warn("git module has been initialized already, duplicate init should be fixed")
|
||||||
|
@ -142,7 +142,7 @@ func HomeDir() string {
|
||||||
// strict check, make sure the git module is initialized correctly.
|
// strict check, make sure the git module is initialized correctly.
|
||||||
// attention: when the git module is called in gitea sub-command (serv/hook), the log module is not able to show messages to users.
|
// attention: when the git module is called in gitea sub-command (serv/hook), the log module is not able to show messages to users.
|
||||||
// for example: if there is gitea git hook code calling git.NewCommand before git.InitXxx, the integration test won't show the real failure reasons.
|
// for example: if there is gitea git hook code calling git.NewCommand before git.InitXxx, the integration test won't show the real failure reasons.
|
||||||
log.Fatal("can not get Git's HomeDir, the setting and git modules are not initialized correctly")
|
log.Fatal("Unable to init Git's HomeDir, incorrect initialization of the setting and git modules")
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return setting.Git.HomePath
|
return setting.Git.HomePath
|
||||||
|
|
Loading…
Add table
Reference in a new issue