mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 22:00:39 +00:00
use gitRepo.GetCommit directly
and give it a commitID instead of a branchName (a bit more correct and faster)
This commit is contained in:
parent
286d09203f
commit
0a53eb838d
2 changed files with 2 additions and 4 deletions
|
@ -283,7 +283,7 @@ func SyncBranchesToDB(ctx context.Context, repoID, pusherID int64, branchNames,
|
|||
continue
|
||||
}
|
||||
|
||||
commit, err := getCommit(branchName)
|
||||
commit, err := getCommit(commitID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("get commit of %s failed: %v", branchName, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue