diff options
author | Unknwon <u@gogs.io> | 2016-08-27 13:37:55 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-27 13:37:55 -0700 |
commit | c30b856d147dd895507c8f2334a11ed4baab6c18 (patch) | |
tree | b0212b58f1026ba581f3f9c0ef1a366a5c4706df /models/repo.go | |
parent | 13c106af7764a0b4757348ab4c82dbf9154ee11c (diff) | |
download | gitea-c30b856d147dd895507c8f2334a11ed4baab6c18.tar.gz gitea-c30b856d147dd895507c8f2334a11ed4baab6c18.zip |
#3505 use user’s info for committer and author
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index 14a5adeb55..1d425fe327 100644 --- a/models/repo.go +++ b/models/repo.go @@ -2303,7 +2303,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, t if err = git.AddChanges(localPath, true); err != nil { return fmt.Errorf("AddChanges: %v", err) - } else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil { + } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{ + Committer: doer.NewGitSig(), + Message: message, + }); err != nil { return fmt.Errorf("CommitChanges: %v", err) } else if err = git.Push(localPath, "origin", branchName); err != nil { return fmt.Errorf("Push: %v", err) |