aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-03 22:49:06 -0500
committerUnknwon <u@gogs.io>2015-11-03 22:49:06 -0500
commit3a81fdf092a39cc94f3bb896a42db8546bd5f39a (patch)
treea436e2de1aaafab77e985c550b165df7dc12f3ae /routers
parent6f0a41b8b28ba33382ab8d655c0d015324be7647 (diff)
downloadgitea-3a81fdf092a39cc94f3bb896a42db8546bd5f39a.tar.gz
gitea-3a81fdf092a39cc94f3bb896a42db8546bd5f39a.zip
rename fields
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/release.go6
-rw-r--r--routers/repo/repo.go4
-rw-r--r--routers/repo/view.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go
index 30d5f60b3f..680ecd1b72 100644
--- a/routers/repo/release.go
+++ b/routers/repo/release.go
@@ -88,10 +88,10 @@ func Releases(ctx *middleware.Context) {
tags[i] = &models.Release{
Title: rawTag,
TagName: rawTag,
- Sha1: commit.Id.String(),
+ Sha1: commit.ID.String(),
}
- tags[i].NumCommits, err = ctx.Repo.GitRepo.CommitsCount(commit.Id.String())
+ tags[i].NumCommits, err = ctx.Repo.GitRepo.CommitsCount(commit.ID.String())
if err != nil {
ctx.Handle(500, "CommitsCount", err)
return
@@ -190,7 +190,7 @@ func NewReleasePost(ctx *middleware.Context, form auth.NewReleaseForm) {
Title: form.Title,
TagName: form.TagName,
Target: form.Target,
- Sha1: commit.Id.String(),
+ Sha1: commit.ID.String(),
NumCommits: commitsCount,
Note: form.Content,
IsDraft: len(form.Draft) > 0,
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index dab9dba1f5..a13526edf4 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -317,7 +317,7 @@ func Download(ctx *middleware.Context) {
return
}
- archivePath = path.Join(archivePath, base.ShortSha(commit.Id.String())+ext)
+ archivePath = path.Join(archivePath, base.ShortSha(commit.ID.String())+ext)
if !com.IsFile(archivePath) {
if err := commit.CreateArchive(archivePath, archiveType); err != nil {
ctx.Handle(500, "Download -> CreateArchive "+archivePath, err)
@@ -325,5 +325,5 @@ func Download(ctx *middleware.Context) {
}
}
- ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+base.ShortSha(commit.Id.String())+ext)
+ ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+base.ShortSha(commit.ID.String())+ext)
}
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 2a36db6b42..bc05b68051 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -151,7 +151,7 @@ func Home(ctx *middleware.Context) {
ctx.Handle(500, "GetCommitOfRelPath", err)
return
}
- files = append(files, []interface{}{te, git.NewSubModuleFile(c, smUrl, te.Id.String())})
+ files = append(files, []interface{}{te, git.NewSubModuleFile(c, smUrl, te.ID.String())})
}
}
ctx.Data["Files"] = files