-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: Include untracked files with --gitignore option #96
Conversation
Thanks for the PR. I am a bit hesitated to directly merge it. Technicaly it looks all fine. But I wonder if it wouldn't overcomplicate things? Is there a real world use case / need for this? Untracked files in a git repo sooner or later are committed, deleted or added to gitignore anyways or not? |
Fair question! :) We had an issue in bitcoin/bitcoin#30496 where a dirty cache-hit was sometimes restoring a Of course, this should not really happen, and we fixed this already by using out of tree python builds, but IMO it makes sense for a |
Hm... got it. Still not 100% convinced. I can already think of others having the exact oposite use case. For example they generate md or html files in the CI pipeline and want to check the output with mlc. I guess they would then be confused when mlc would only check files which are staged. |
Might it work better for you if I implemented a new, separate |
Maybe even '--gitignoreuntracked' or the oposite such as If you really see a need in having this I would be OK and merge it if you put the logic behind a separte flag without changing the original |
b25bb81
to
9ff5e7f
Compare
This will allow ignoring files which are untracked by git. Use in conjunction with --gitignore for best effect.
9ff5e7f
to
6f79d4e
Compare
Ok I have updated this to be behind its own flag I think the CI failure is suprious and will pass on a re-run?
|
Verified that the CI passes for me locally: Details
|
This adds a new flag
--gituntracked
which will ignore files that are untracked by git. This could include generated content or build artifacts.This is implemented seperately from
--gitignore
to provide more granularity over which files will be ignored.