forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/dismissing_reviews
* master: (28 commits) [Docs] Clone filters (go-gitea#14555) update docs to show latest stable version (1.13.2) (go-gitea#14550) Adding Chi's GetHead middleware (go-gitea#14541) Changelog v1.13.2 (go-gitea#14535) (go-gitea#14543) [skip ci] Updated translations via Crowdin [API] List, Check, Add & delete endpoints for repository teams (go-gitea#13630) [skip ci] Updated translations via Crowdin rm redirect (go-gitea#14534) Upgrade 'css-minimizer-webpack-plugin' to the latest version (go-gitea#14527) Set the name Mapper in migrations (go-gitea#14526) Internal ssh server respect Ciphers, MACs and KeyExchanges settings (go-gitea#14523) Move middlewares to web/middleware (go-gitea#14480) Add Doctor FixWrongUserType (go-gitea#14522) [skip ci] Updated translations via Crowdin noop (go-gitea#14521) Update docs and comments to remove macaron (go-gitea#14491) [skip ci] Updated translations via Crowdin Fix json charset bug (go-gitea#14514) enhancement: add signoff option in commit form (go-gitea#14516) Fix load time bug (go-gitea#14508) ...
- Loading branch information
Showing
525 changed files
with
32,151 additions
and
14,634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
date: "2016-12-01T16:00:00+02:00" | ||
title: "進階" | ||
slug: "advanced" | ||
weight: 30 | ||
toc: false | ||
draft: false | ||
menu: | ||
sidebar: | ||
name: "進階" | ||
weight: 40 | ||
identifier: "advanced" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
date: "2021-02-02" | ||
title: "Clone filters (partial clone)" | ||
slug: "clone-filters" | ||
weight: 25 | ||
draft: false | ||
toc: false | ||
menu: | ||
sidebar: | ||
parent: "advanced" | ||
name: "Clone filters" | ||
weight: 25 | ||
identifier: "clone-filters" | ||
--- | ||
|
||
# Clone filters (partial clone) | ||
|
||
Git introduces `--filter` option to `git clone` command, which filters out | ||
large files and objects (such as blobs) to create partial clone of a repo. | ||
Clone filters are especially useful for large repo and/or metered connection, | ||
where full clone (without `--filter`) can be expensive (as all history data | ||
must be downloaded). | ||
|
||
This requires Git version 2.22 or later, both on the Gitea server and on the | ||
client. For clone filters to work properly, make sure that Git version | ||
on the client is at least the same as on the server (or later). Login to | ||
Gitea server as admin and head to Site Administration -> Configuration to | ||
see Git version of the server. | ||
|
||
By default, clone filters are disabled, which cause the server to ignore | ||
`--filter` option. | ||
|
||
To enable clone filters on per-repo basis, edit the repo's `config` on | ||
repository location. Consult `ROOT` option on `repository` section of | ||
Gitea configuration (`app.ini`) for the exact location. For example, to | ||
enable clone filters for `some-repo`, edit | ||
`/var/gitea/data/gitea-repositories/some-user/some-repo.git/config` and add: | ||
|
||
```ini | ||
[uploadpack] | ||
allowfilter = true | ||
``` | ||
|
||
To enable clone filters globally, add that config above to `~/.gitconfig` | ||
of user that run Gitea (for example `git`). | ||
|
||
Alternatively, you can use `git config` to set the option. | ||
|
||
To enable for a specific repo: | ||
|
||
```bash | ||
cd /var/gitea/data/gitea-repositories/some-user/some-repo.git | ||
git config --local uploadpack.allowfilter true | ||
``` | ||
To enable globally, login as user that run Gitea and: | ||
|
||
```bash | ||
git config --global uploadpack.allowfilter true | ||
``` | ||
|
||
See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/) | ||
for common use cases of clone filters (blobless and treeless clones), and | ||
[Gitlab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html) | ||
for more advanced use cases (such as filter by file size and remove | ||
filters to turn partial clone into full clone). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
date: "2016-12-01T16:00:00+02:00" | ||
title: "開發人員" | ||
slug: "developers" | ||
weight: 40 | ||
toc: false | ||
draft: false | ||
menu: | ||
sidebar: | ||
name: "開發人員" | ||
weight: 50 | ||
identifier: "developers" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
date: "2019-04-15T17:29:00+08:00" | ||
title: "整合" | ||
slug: "integrations" | ||
weight: 40 | ||
toc: false | ||
draft: false | ||
menu: | ||
sidebar: | ||
parent: "developers" | ||
name: "整合" | ||
weight: 65 | ||
identifier: "integrations" | ||
--- | ||
|
||
# 整合 | ||
|
||
Gitea 有著很棒的第三方整合社群, 以及其它有著一流支援的專案。 | ||
|
||
我們持續的整理一份清單以追蹤他們!請到 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 查看。 | ||
|
||
如果您正在找尋有關 [CI/CD](https://gitea.com/gitea/awesome-gitea#devops)、[SDK](https://gitea.com/gitea/awesome-gitea#sdk) 或是其它佈景主題,您可以在存儲庫 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 找到他們。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
date: "2019-04-15T17:29:00+08:00" | ||
title: "遷移介面" | ||
slug: "migrations-interfaces" | ||
weight: 30 | ||
toc: false | ||
draft: false | ||
menu: | ||
sidebar: | ||
parent: "developers" | ||
name: "遷移介面" | ||
weight: 55 | ||
identifier: "migrations-interfaces" | ||
--- | ||
|
||
# 遷移功能 | ||
|
||
完整的遷移從 Gitea 1.9.0 開始提供。它定義了兩個介面用來從其它 Git 託管平臺遷移儲存庫資料到 Gitea,未來或許會提供遷移到其它 git 託管平臺。 | ||
目前已實作了從 Github, Gitlab 和其它 Gitea 遷移資料。 | ||
|
||
Gitea 定義了一些基本物件於套件 [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base)。 | ||
分別是 `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`。 | ||
|
||
## Downloader 介面 | ||
|
||
從新的 Git 託管平臺遷移,有兩個新的步驟。 | ||
|
||
- 您必須實作一個 `Downloader`,它用來取得儲存庫資訊。 | ||
- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`。 | ||
- 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`。 | ||
|
||
您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go) 中找到這些介面。 | ||
|
||
## Uploader 介面 | ||
|
||
目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。 | ||
目前尚未支援其它 Uploader。 | ||
|
||
您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go) 中找到這些介面。 |
Oops, something went wrong.