summaryrefslogtreecommitdiffstats
path: root/routers/repo/branch.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-12 02:29:29 -0700
committerUnknwon <u@gogs.io>2016-08-14 23:52:24 -0700
commit15845cb28763c1542556ad61d2aa9735541dbf45 (patch)
tree94b2053202fcf5270e0697fc37c38203310571ed /routers/repo/branch.go
parentd0a0239bacf02eb004634dfe1bb0a3f7dfe5adb6 (diff)
downloadgitea-15845cb28763c1542556ad61d2aa9735541dbf45.tar.gz
gitea-15845cb28763c1542556ad61d2aa9735541dbf45.zip
Code clean up for new config options
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r--routers/repo/branch.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go
index 453df3745e..7b8940a943 100644
--- a/routers/repo/branch.go
+++ b/routers/repo/branch.go
@@ -64,13 +64,8 @@ func NewBranchPost(ctx *context.Context, form auth.NewBranchForm) {
log.Error(4, "branch.GetCommit(): %v", err)
} else {
pc := &models.PushCommits{
- Len: 1,
- Commits: []*models.PushCommit{&models.PushCommit{
- commit.ID.String(),
- commit.Message(),
- commit.Author.Email,
- commit.Author.Name,
- }},
+ Len: 1,
+ Commits: []*models.PushCommit{models.CommitToPushCommit(commit)},
}
oldCommitID := "0000000000000000000000000000000000000000" // New Branch so we use all 0s
newCommitID := commit.ID.String()