mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-17 14:11:46 +00:00
Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511)
Extracted from #35077 `UpdateRef` and `RemoveRef` will call git commands even for gogit version.
This commit is contained in:
@@ -224,7 +224,7 @@ func GetMergedBaseCommitID(ctx *context.Context, issue *issues_model.Issue) stri
|
||||
commitSHA, err = ctx.Repo.GitRepo.ReadPatchCommit(pull.Index)
|
||||
if err == nil {
|
||||
// Recreate pull head in files for next time
|
||||
if err := ctx.Repo.GitRepo.SetReference(pull.GetGitHeadRefName(), commitSHA); err != nil {
|
||||
if err := gitrepo.UpdateRef(ctx, ctx.Repo.Repository, pull.GetGitHeadRefName(), commitSHA); err != nil {
|
||||
log.Error("Could not write head file", err)
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user