mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-19 11:18:16 +08:00
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?
This commit is contained in:
@ -77,9 +77,9 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
|
||||
RepoID: repo.ID,
|
||||
Name: branch,
|
||||
CommitID: commit.ID.String(),
|
||||
CommitMessage: commit.CommitMessage,
|
||||
CommitMessage: commit.Summary(),
|
||||
PusherID: doerID,
|
||||
CommitTime: timeutil.TimeStamp(commit.Author.When.Unix()),
|
||||
CommitTime: timeutil.TimeStamp(commit.Committer.When.Unix()),
|
||||
})
|
||||
} else if commit.ID.String() != dbb.CommitID {
|
||||
toUpdate = append(toUpdate, &git_model.Branch{
|
||||
@ -87,9 +87,9 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
|
||||
RepoID: repo.ID,
|
||||
Name: branch,
|
||||
CommitID: commit.ID.String(),
|
||||
CommitMessage: commit.CommitMessage,
|
||||
CommitMessage: commit.Summary(),
|
||||
PusherID: doerID,
|
||||
CommitTime: timeutil.TimeStamp(commit.Author.When.Unix()),
|
||||
CommitTime: timeutil.TimeStamp(commit.Committer.When.Unix()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user