summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-06-30 17:03:05 +0800
committerGitHub <noreply@github.com>2023-06-30 17:03:05 +0800
commit65acd1e9ef9eda01fd9b07a72abafa2d7bf83435 (patch)
treee15f850f961783510651a1eb8cb50b4d0b4091ae /services
parent67bd9d4f1eedb4728031504d0dd09d014c0f3e6f (diff)
downloadgitea-65acd1e9ef9eda01fd9b07a72abafa2d7bf83435.tar.gz
gitea-65acd1e9ef9eda01fd9b07a72abafa2d7bf83435.zip
Fix branch commit message too long problem (#25588)
When branch's commit CommitMessage is too long, the column maybe too short.(TEXT 16K for mysql). This PR will fix it to only store the summary because these message will only show on branch list or possible future search?
Diffstat (limited to 'services')
-rw-r--r--services/repository/push.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/push.go b/services/repository/push.go
index 7e7069f580..8e4bab1562 100644
--- a/services/repository/push.go
+++ b/services/repository/push.go
@@ -259,7 +259,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
notification.NotifyPushCommits(ctx, pusher, repo, opts, commits)
- if err = git_model.UpdateBranch(ctx, repo.ID, branch, newCommit.ID.String(), newCommit.CommitMessage, opts.PusherID, newCommit.Committer.When); err != nil {
+ if err = git_model.UpdateBranch(ctx, repo.ID, opts.PusherID, branch, newCommit); err != nil {
return fmt.Errorf("git_model.UpdateBranch %s:%s failed: %v", repo.FullName(), branch, err)
}