diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-03-27 17:33:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 17:33:00 +0800 |
commit | d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (patch) | |
tree | f0bc12702264f2400f1b4308e06f9aa631fe3cca /routers | |
parent | d056bf300ff5ebd89d8b0035722c94a3b08ac745 (diff) | |
download | gitea-d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d.tar.gz gitea-d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d.zip |
move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/convert/convert.go | 9 | ||||
-rw-r--r-- | routers/api/v1/repo/commits.go | 5 | ||||
-rw-r--r-- | routers/api/v1/repo/file.go | 3 | ||||
-rw-r--r-- | routers/api/v1/repo/git_ref.go | 3 | ||||
-rw-r--r-- | routers/api/v1/repo/hook.go | 2 | ||||
-rw-r--r-- | routers/api/v1/repo/pull.go | 3 | ||||
-rw-r--r-- | routers/api/v1/repo/tree.go | 2 | ||||
-rw-r--r-- | routers/init.go | 2 | ||||
-rw-r--r-- | routers/private/push_update.go | 2 | ||||
-rw-r--r-- | routers/repo/branch.go | 2 | ||||
-rw-r--r-- | routers/repo/commit.go | 2 | ||||
-rw-r--r-- | routers/repo/download.go | 3 | ||||
-rw-r--r-- | routers/repo/editor.go | 2 | ||||
-rw-r--r-- | routers/repo/issue.go | 8 | ||||
-rw-r--r-- | routers/repo/middlewares.go | 2 | ||||
-rw-r--r-- | routers/repo/pull.go | 2 | ||||
-rw-r--r-- | routers/repo/repo.go | 7 | ||||
-rw-r--r-- | routers/repo/setting.go | 3 | ||||
-rw-r--r-- | routers/repo/setting_protected_branch.go | 2 | ||||
-rw-r--r-- | routers/repo/view.go | 2 | ||||
-rw-r--r-- | routers/repo/webhook.go | 2 | ||||
-rw-r--r-- | routers/repo/wiki.go | 3 | ||||
-rw-r--r-- | routers/repo/wiki_test.go | 2 |
23 files changed, 32 insertions, 41 deletions
diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go index 6569d21ab8..7de4d5acc1 100644 --- a/routers/api/v1/convert/convert.go +++ b/routers/api/v1/convert/convert.go @@ -7,14 +7,13 @@ package convert import ( "fmt" - "github.com/Unknwon/com" - - api "code.gitea.io/sdk/gitea" - - "code.gitea.io/git" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/util" + api "code.gitea.io/sdk/gitea" + + "github.com/Unknwon/com" ) // ToEmail convert models.EmailAddress to api.Email diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go index 3596e88015..75eff488db 100644 --- a/routers/api/v1/repo/commits.go +++ b/routers/api/v1/repo/commits.go @@ -8,12 +8,11 @@ package repo import ( "time" - "code.gitea.io/git" - api "code.gitea.io/sdk/gitea" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/sdk/gitea" ) // GetSingleCommit get a commit via diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 929ed00d68..3ce80d24f0 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -8,9 +8,8 @@ package repo import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/routers/repo" - - "code.gitea.io/git" ) // GetRawFile get a file by path on a repository diff --git a/routers/api/v1/repo/git_ref.go b/routers/api/v1/repo/git_ref.go index ffdfc57b1d..6a6ed9ff36 100644 --- a/routers/api/v1/repo/git_ref.go +++ b/routers/api/v1/repo/git_ref.go @@ -6,8 +6,7 @@ package repo import ( "code.gitea.io/gitea/modules/context" - - "code.gitea.io/git" + "code.gitea.io/gitea/modules/git" api "code.gitea.io/sdk/gitea" ) diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index f01049721e..ef9d5ac1d3 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -5,9 +5,9 @@ package repo import ( - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/utils" api "code.gitea.io/sdk/gitea" diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 156ca83a19..7abe6241bd 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -9,14 +9,13 @@ import ( "net/http" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/util" - api "code.gitea.io/sdk/gitea" ) diff --git a/routers/api/v1/repo/tree.go b/routers/api/v1/repo/tree.go index 8a5d0c4b01..012eba673e 100644 --- a/routers/api/v1/repo/tree.go +++ b/routers/api/v1/repo/tree.go @@ -8,8 +8,8 @@ import ( "fmt" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" "code.gitea.io/sdk/gitea" ) diff --git a/routers/init.go b/routers/init.go index 2fc3bb9668..3b8d8ac908 100644 --- a/routers/init.go +++ b/routers/init.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/cron" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/highlight" issue_indexer "code.gitea.io/gitea/modules/indexer/issues" "code.gitea.io/gitea/modules/log" diff --git a/routers/private/push_update.go b/routers/private/push_update.go index 988d273344..5c42f066ee 100644 --- a/routers/private/push_update.go +++ b/routers/private/push_update.go @@ -8,8 +8,8 @@ import ( "encoding/json" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" macaron "gopkg.in/macaron.v1" diff --git a/routers/repo/branch.go b/routers/repo/branch.go index 44fd4bcd18..19925c1edc 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -8,11 +8,11 @@ package repo import ( "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/util" ) diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 820a546468..9e40ced7fb 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -8,10 +8,10 @@ import ( "path" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" diff --git a/routers/repo/download.go b/routers/repo/download.go index 57a1e65ac9..41c4a18102 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -11,10 +11,9 @@ import ( "path" "strings" - "code.gitea.io/git" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/lfs" ) diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 01963d8dc6..54046258b8 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -11,11 +11,11 @@ import ( "path" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/templates" diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 33d3ec6a74..2db2cfc71b 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -15,20 +15,20 @@ import ( "strconv" "strings" - "github.com/Unknwon/com" - "github.com/Unknwon/paginater" - - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" issue_indexer "code.gitea.io/gitea/modules/indexer/issues" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + + "github.com/Unknwon/com" + "github.com/Unknwon/paginater" ) const ( diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go index 4dee272edb..6ff09cb845 100644 --- a/routers/repo/middlewares.go +++ b/routers/repo/middlewares.go @@ -3,9 +3,9 @@ package repo import ( "fmt" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" ) // SetEditorconfigIfExists set editor config as render variable diff --git a/routers/repo/pull.go b/routers/repo/pull.go index c61ae905f7..08c833c167 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -13,11 +13,11 @@ import ( "path" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 42dfd56268..5add788fc8 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -10,17 +10,16 @@ import ( "path" "strings" - "github.com/Unknwon/com" - - "code.gitea.io/git" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + + "github.com/Unknwon/com" ) const ( diff --git a/routers/repo/setting.go b/routers/repo/setting.go index d68edb4e56..2520b57bc7 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -10,12 +10,11 @@ import ( "strings" "time" - "code.gitea.io/git" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" diff --git a/routers/repo/setting_protected_branch.go b/routers/repo/setting_protected_branch.go index def27753dc..05ad0ec0ec 100644 --- a/routers/repo/setting_protected_branch.go +++ b/routers/repo/setting_protected_branch.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" ) diff --git a/routers/repo/view.go b/routers/repo/view.go index 786cfcbc56..dcd546ff68 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -14,10 +14,10 @@ import ( "path" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/highlight" "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index cea5145353..8510cb7ba2 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -12,11 +12,11 @@ import ( "path" "strings" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/sdk/gitea" diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 8426406c31..790214e8e5 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -11,12 +11,11 @@ import ( "path/filepath" "strings" - "code.gitea.io/git" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/util" diff --git a/routers/repo/wiki_test.go b/routers/repo/wiki_test.go index 99812cab47..7302f9e48b 100644 --- a/routers/repo/wiki_test.go +++ b/routers/repo/wiki_test.go @@ -9,9 +9,9 @@ import ( "net/http" "testing" - "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/test" "github.com/stretchr/testify/assert" |