diff options
author | James Fargher <jfargher@gitlab.com> | 2022-06-21 05:45:37 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2022-06-21 05:45:37 +0300 |
commit | 227a594d2128d80f4239fea952e33eb372740782 (patch) | |
tree | 51c8f94e0ee83703f9f255e865278b61c8cd6ba3 | |
parent | 632244d99c5a0080ff31ece43c0831a9ab192967 (diff) |
Ensure there is a receive hooks payload before using itfix_receive_hooks_payload_nil
Changelog: fixed
-rw-r--r-- | cmd/gitaly-hooks/hooks.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/gitaly-hooks/hooks.go b/cmd/gitaly-hooks/hooks.go index 10a0d2514..35248e143 100644 --- a/cmd/gitaly-hooks/hooks.go +++ b/cmd/gitaly-hooks/hooks.go @@ -399,7 +399,7 @@ func handlePackObjectsWithSidechannel(ctx context.Context, payload git.HooksPayl glID = payload.UserDetails.UserID glUsername = payload.UserDetails.Username gitProtocol = payload.UserDetails.Protocol - } else { + } else if payload.ReceiveHooksPayload != nil { glID = payload.ReceiveHooksPayload.UserID glUsername = payload.ReceiveHooksPayload.Username gitProtocol = payload.ReceiveHooksPayload.Protocol |