mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-21 12:13:38 +09: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:
@@ -116,7 +116,7 @@ func (repo *Repository) ConvertToGitID(ctx context.Context, ref string) (ObjectI
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(ref) == objectFormat.FullLength() && objectFormat.IsValid(ref) {
|
||||
if IsStringValidObjectID(objectFormat, ref) {
|
||||
id, err := NewIDFromString(ref)
|
||||
if err == nil {
|
||||
return id, nil
|
||||
|
||||
Reference in New Issue
Block a user