aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Zaremba <fabian@youremail.eu>2017-03-16 12:33:22 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-16 19:33:22 +0800
commitf1d2f16b544ef5ef66a45d0a8859d133c46979a4 (patch)
tree2e5f8e32866a50d291ae7ff6f489d570dd39c977
parent447c9b428f4cf50174ef7f3fbea56b5405f6bbf8 (diff)
downloadgitea-f1d2f16b544ef5ef66a45d0a8859d133c46979a4.tar.gz
gitea-f1d2f16b544ef5ef66a45d0a8859d133c46979a4.zip
Add notice that LFS mirroring is not supported (#1251)
* Add notice that LFS mirroring is not supported * Drop German translation
-rw-r--r--options/locale/locale_en-US.ini1
-rw-r--r--routers/repo/repo.go1
-rw-r--r--templates/repo/migrate.tmpl5
3 files changed, 6 insertions, 1 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index ad75f28c97..2ac92a4f8b 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -442,6 +442,7 @@ migrate.clone_local_path = or local server path
migrate.permission_denied = You are not allowed to import local repositories.
migrate.invalid_local_path = Invalid local path, it does not exist or not a directory.
migrate.failed = Migration failed: %v
+migrate.lfs_mirror_unsupported = Mirroring LFS objects is not supported - use 'git lfs fetch --all' and 'git lfs push --all' instead.
mirror_from = mirror of
forked_from = forked from
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index fa111d5e4a..9b411648c6 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -153,6 +153,7 @@ func Migrate(ctx *context.Context) {
ctx.Data["private"] = ctx.User.LastRepoVisibility
ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate
ctx.Data["mirror"] = ctx.Query("mirror") == "1"
+ ctx.Data["LFSActive"] = setting.LFS.StartServer
ctxUser := checkContextUser(ctx, ctx.QueryInt64("org"))
if ctx.Written() {
diff --git a/templates/repo/migrate.tmpl b/templates/repo/migrate.tmpl
index 17d5630328..e05768e417 100644
--- a/templates/repo/migrate.tmpl
+++ b/templates/repo/migrate.tmpl
@@ -12,7 +12,10 @@
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
<label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
- <span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}</span>
+ <span class="help">
+ {{.i18n.Tr "repo.migrate.clone_address_desc"}}{{if .ContextUser.CanImportLocal}} {{.i18n.Tr "repo.migrate.clone_local_path"}}{{end}}
+ {{if .LFSActive}}<br/>{{.i18n.Tr "repo.migrate.lfs_mirror_unsupported"}}{{end}}
+ </span>
</div>
<div class="ui accordion optional field">
<div class="title {{if .Err_Auth}}text red active{{end}}">