diff options
author | Unknwon <u@gogs.io> | 2016-08-12 02:29:29 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-14 23:52:24 -0700 |
commit | 15845cb28763c1542556ad61d2aa9735541dbf45 (patch) | |
tree | 94b2053202fcf5270e0697fc37c38203310571ed /routers/repo/branch.go | |
parent | d0a0239bacf02eb004634dfe1bb0a3f7dfe5adb6 (diff) | |
download | gitea-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.go | 9 |
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() |