Codecov report after aligning to master


We started using Codecov using BitBucket and the bash uploader.
Some users align their branch to master when working on the PR (git merge master).
When reporting on their branch Codecov shows all files from master as part of the PR and not only the files relevant to the PR.
Bitbucket pull requests show only the relevant files & changes.




Bitbucket pipelines


using the bash uploader

Codecov YAML

We don’t have one

Hi @orca, I’m not really sure I understand. When you say “reporting on their branch Codecov shows all files”, do you mean in the PR comment or on the UI? Do you have any screenshots to help show the issue?

I’ll try to be more clear. Say we have a master branch with two files &, and we have our feature branch which includes also While developing the feature other developers merge code to master, now we have also in master.

master ->,,
feature ->,,

A developer decides to align with master, it run the following command git merge origin/master and pushes the code. When looking at the final coverage report we will get also information about files that are in master and are not different and are not part of the PR.

I hope this is clearer

Hmmm, I’m not sure this is a problem @orca, so please correct me if I’m wrong.

By doing a git merge, this will create a new commit with both master and feature files. That commit will then (presumably) run tests, collect coverage, and upload those metrics to Codecov. You should expect to see coverage information on files from master, because a merge commit will have those files.

I would have expected to only show the diff between the master and current branch.
The way Github/BitBucket/GitLab only show you the relevant files in the PR although I have aligned to master.
e.g. the diff between my feature branch and master

Hmmm, @orca could you share a commit SHA?