diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-22 17:30:52 +0800 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-12-22 10:30:52 +0100 |
commit | 47a7529d9655e11471bbe39958222a13854a6133 (patch) | |
tree | 98e597255245e17d39a0062c3977fb8a510cf413 /routers/repo | |
parent | 0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff) | |
download | gitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz gitea-47a7529d9655e11471bbe39958222a13854a6133.zip |
update code.gitea.io/git (#450)
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/http.go | 2 | ||||
-rw-r--r-- | routers/repo/webhook.go | 4 | ||||
-rw-r--r-- | routers/repo/wiki.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index 91438812a6..2f0a707f7c 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -208,7 +208,7 @@ func HTTP(ctx *context.Context) { RepoUserName: username, RepoName: reponame, }); err == nil { - go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refFullName, git.BRANCH_PREFIX), true) + go models.AddTestPullRequestTask(authUser, repo.ID, strings.TrimPrefix(refFullName, git.BranchPrefix), true) } } diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index c3150a02f6..754cf169b8 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -361,7 +361,7 @@ func TestWebhook(ctx *context.Context) { if commit == nil { ghost := models.NewGhostUser() commit = &git.Commit{ - ID: git.MustIDFromString(git.EMPTY_SHA), + ID: git.MustIDFromString(git.EmptySHA), Author: ghost.NewGitSig(), Committer: ghost.NewGitSig(), CommitMessage: "This is a fake commit", @@ -370,7 +370,7 @@ func TestWebhook(ctx *context.Context) { apiUser := ctx.User.APIFormat() p := &api.PushPayload{ - Ref: git.BRANCH_PREFIX + ctx.Repo.Repository.DefaultBranch, + Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, Before: commit.ID.String(), After: commit.ID.String(), Commits: []*api.PayloadCommit{ diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index ebef4bbbcb..759b1b305e 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -66,7 +66,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, str } pages := make([]PageMeta, 0, len(entries)) for i := range entries { - if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") { + if entries[i].Type == git.ObjectBlob && strings.HasSuffix(entries[i].Name(), ".md") { name := strings.TrimSuffix(entries[i].Name(), ".md") pages = append(pages, PageMeta{ Name: name, @@ -171,7 +171,7 @@ func WikiPages(ctx *context.Context) { } pages := make([]PageMeta, 0, len(entries)) for i := range entries { - if entries[i].Type == git.OBJECT_BLOB && strings.HasSuffix(entries[i].Name(), ".md") { + if entries[i].Type == git.ObjectBlob && strings.HasSuffix(entries[i].Name(), ".md") { c, err := wikiRepo.GetCommitByPath(entries[i].Name()) if err != nil { ctx.Handle(500, "GetCommit", err) |