Tracking which commits were pushed together

This might mostly be a question about git usage, but the interesting repository is in GitLab and that might offer something (or make something harder).

We have a repo from which checkouts (of HEAD) happen automatically and stuff is done from that. As a consequence we would like to minimise the number of errors that enter, so we have a pre-receive hook on the GitLab server, checking for a number of things.

It’s not perfect though, and a couple of weeks ago, an error sneaked in. In trying to prevent that it was discovered that a (small) number of the later commits didn’t pass the checks. That made some worry that the hook isn’t executed properly.

I’ve checked 1500 commits back, and in all cases the next commit fixed the error. To me that suggests a workflow (that actually matches mine working with that repo) where upon receiving a failure on push (from the pre-receive hook - or something else, but that’s not relevant here) one makes a new commit (rather than amending the bad commit) fixing the error, and then retries the push, now adding two commits to the history (for this change). Can I verify that that is what happened, and that the bad commit was never HEAD on the repo in GitLab (it must have been on the developer’s fork, but that doesn’t matter).