Do merge request pipelines look at changes on latest commit or all commits?

When we run a merge request pipeline, does it consider only the changes in the last commit or does it look at all the changes in the branch we are merging from?

I’ve tried running a regular branch pipeline and a detached merge request pipeline and the jobs triggered are different. I was wondering if the merge request pipeline is looking at things differently then the regular branch pipeline, but I could not find any info about this in the docs. Only that the ‘detached’ pipelines cannot access protected variables.

Thank you