codecov / codecov/codecov-cli

[BUG] Git files (network) not found when run from a non-git folder.

Open
#624 1 comment 0 reactions 1 assignee View on GitHub

@thomasrockhu-codecov is already working on this.

Since Feb 14, 2025.

Area: Report Upload bug codecov/codecov-cli Eng Area: CLI: General high
Dominant language
Python
Stars
89
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I tried uploading a coverage file from GitHub Actions and noticed that the path fixup didn't work anymore.
I traced that to this issue: GitVersioningSystem.is_available only returns True if the current directory is a git repository

So even if --network-root-folder was specified and set to a git repository it will not be detected because GitVersioningSystem is not used as it fails if the current folder is not a git repo and hence git rev-parse --show-toplevel fails to early.

To Reproduce
Steps to reproduce the behavior:

  1. Go to an empty folder
  2. run the app with --network-root-folder set correctly
  3. See that "relevant files" is empty and fixups are not done

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.