mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-20 21:29:14 +00:00
fix(migrations): preserve SHA-256 pull request commit IDs (#39343)
* Fixes #39339 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -203,8 +203,8 @@ func (repo *Repository) searchCommits(ctx context.Context, id ObjectID, opts Sea
|
||||
// if there are any keywords (ie not committer:, author:, time:)
|
||||
// then let's iterate over them
|
||||
for _, v := range opts.Keywords {
|
||||
// ignore anything not matching a valid sha pattern
|
||||
if id.Type().IsValid(v) {
|
||||
// ignore anything not matching a valid sha pattern (TODO: the legacy min-length is pretty small, is it right or fine?)
|
||||
if IsStringValidObjectID(id.Type(), v, 4) {
|
||||
// create new git log command with 1 commit limit
|
||||
hashCmd := gitcmd.NewCommand("log", "-1", prettyLogFormat)
|
||||
// add previous arguments except for --grep and --all
|
||||
|
||||
Reference in New Issue
Block a user