Description
The error message displayed if the working directory is not a git repository is vague and does not point to the root of the problem: Repository is not found or not have change. The error message should say which one it is (no repository, or no change).
Steps to reproduce
- Try to scan a repository which has a
.dockerignore file excluding .git from the Docker context.
- Run
codefox scan in Docker, mounting the repository to analyze as a bind mount.
Expected behavior
A clear error message explaining that the directory is not a git repository (.git not found).
Actual behavior
Repository is not found or not have change
Environment
- OS: Ubuntu 22.04
- Python version: 3.11
- CodeFox version: 0.4.6
- Provider: N/A
- Model: N/A
Config (optional)
Not relevant.
Additional context
I want to run CodeFox in a Docker container for security. Our repo uses .dockerignore to reduce the Docker context size when building our product, and .git is excluded since unnecessary. Sadly this conflicts with CodeFox, which needs .git. It was not easy for me to understand why it was not working, and clearer error messages would have helped.
Description
The error message displayed if the working directory is not a git repository is vague and does not point to the root of the problem:
Repository is not found or not have change. The error message should say which one it is (no repository, or no change).Steps to reproduce
.dockerignorefile excluding.gitfrom the Docker context.codefox scanin Docker, mounting the repository to analyze as a bind mount.Expected behavior
A clear error message explaining that the directory is not a git repository (
.gitnot found).Actual behavior
Repository is not found or not have changeEnvironment
Config (optional)
Not relevant.
Additional context
I want to run CodeFox in a Docker container for security. Our repo uses
.dockerignoreto reduce the Docker context size when building our product, and.gitis excluded since unnecessary. Sadly this conflicts with CodeFox, which needs.git. It was not easy for me to understand why it was not working, and clearer error messages would have helped.