direct: use local branch name, instead of remote

If we fetch only one commit and force fetch the branch to local,
it seems that the remote head ref is not actually set. So, we should
just use the local version anyway, as it's updated.
This commit is contained in:
2025-11-24 11:38:54 +01:00
parent 71aa0813ad
commit 76bfa612c5

View File

@@ -211,7 +211,7 @@ func processConfiguredPushAction(action *common.PushWebhookEvent, config *common
common.LogError("Error fetching branch:", branch, "Ignoring as non-existent.", err)
return
}
id, err := git.GitRemoteHead(filepath.Join(gitPrj, action.Repository.Name), "origin", branch)
id, err := git.GitBranchHead(filepath.Join(gitPrj, action.Repository.Name), branch)
common.PanicOnError(err)
if action.Head_Commit.Id == id {
git.GitExecOrPanic(filepath.Join(gitPrj, action.Repository.Name), "checkout", id)