From 358555f72ca03b758283864473601443c41890a5 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Thu, 9 Sep 2021 04:20:55 +0800 Subject: [PATCH] Return correct error response for agit force-push (#16989) fix a samll nit for agit `force-push` error response Signed-off-by: a1012112796 <1012112796@qq.com> --- services/agit/agit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/agit/agit.go b/services/agit/agit.go index 3fca844f9..f32ad371d 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -213,7 +213,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat return nil } else if len(output) > 0 { results = append(results, private.HookProcReceiveRefResult{ - OriginalRef: oldCommitID, + OriginalRef: opts.RefFullNames[i], OldOID: opts.OldCommitIDs[i], NewOID: opts.NewCommitIDs[i], Err: "request `force-push` push option",