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

Have -enforce-clean cause a failure when "before" location is unlcean #86

Merged

Conversation

michaelboyd2
Copy link
Contributor

We encountered a problem where a feature branch had a .gitignored file, but this was not in the main branch .gitignore. Even when using -enforce-clean, this caused target determinator to identify all targets as changed in the workspace.

This change is to make this situation cause a failure instead.

Closes #85

* Make the error message less ambiguous, because "pre-checkout" and
  "post-checkout" may be misread to refer to "the before commit" and
  "the after commit" rather than "after checking out the before commit".
* Add test which shows that if a file is consistently .gitignore'd
  before and after, it will continue to work.
@illicitonion
Copy link
Collaborator

This looks good to me - I made a PR to this PR with a few suggestions: michaelboyd2#1 - please take a look and merge it if you're happy, and I'll merge this one :) Thanks for taking the time!

@michaelboyd2
Copy link
Contributor Author

Thanks very much, merged your suggestions.

@illicitonion illicitonion merged commit ca12c67 into bazel-contrib:main Apr 8, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

Support -enforce-clean=enforce-clean for when the "before" location is unclean
2 participants