diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-07-01 07:48:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-01 07:48:25 +0800 |
commit | d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3 (patch) | |
tree | 9130f85803274a73f278b335e5fb2a014288a5c7 /cmd | |
parent | 184a7d4195baffb169f24f4e9a4524f8d4045e91 (diff) | |
download | gitea-d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3.tar.gz gitea-d6c0aa7f1cfa1271d8273a5be7d31e4dc8e0d9f3.zip |
Fix `dump-repo` git init, fix wrong error type for NullDownloader (#20182)
* Fix `dump-repo` git init
* fix wrong error type for NullDownloader
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dump_repo.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/dump_repo.go b/cmd/dump_repo.go index e980af3011..be0171c9f7 100644 --- a/cmd/dump_repo.go +++ b/cmd/dump_repo.go @@ -10,6 +10,7 @@ import ( "strings" "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" base "code.gitea.io/gitea/modules/migration" "code.gitea.io/gitea/modules/setting" @@ -83,6 +84,11 @@ func runDumpRepository(ctx *cli.Context) error { return err } + // migrations.GiteaLocalUploader depends on git module + if err := git.InitSimple(context.Background()); err != nil { + return err + } + log.Info("AppPath: %s", setting.AppPath) log.Info("AppWorkPath: %s", setting.AppWorkPath) log.Info("Custom path: %s", setting.CustomPath) |