Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during analysis - Unknown revision or path not in the working tree #478

Open
santhosh-fit opened this issue Jan 5, 2024 · 1 comment

Comments

@santhosh-fit
Copy link

santhosh-fit commented Jan 5, 2024

I have setup rubycritic for my project with base branch in rubycritic.yml for comparison. On CI for the feature branches, I have setup rubycritic analysis to be run for all the modified files only(instead of running on all files in app or lib folders), which runs the analysis for the identified files on main branch, the feature branch and produces the report with comparison (main vs feature branch). However, if there was a new file added as part of feature branch, the analysis produces an error while running on main branch as:

running churn
fatal: ambiguous argument 'app/models/<file>.rb': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

I understand that the new file is not part of main branch and hence this error. The analysis continues to run on feature branch and also produces a report.

Is there a way to skip running compare/analysis on main for the new files?

@faisal
Copy link
Contributor

faisal commented May 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants