-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Describe the bug
When using revision_mode="scm" or "scm_folder" on a dirty repo, the error shows this message:
ERROR: Can't have a dirty repository using revision_mode='scm' and doing 'conan export', please commit the changes and run again, or use 'git_excluded = []' attribute
But there is no documentation around git_excluded. Searching for the error message took me to this line:
conan/conan/internal/api/export.py
Line 119 in cf402f7
| excluded = getattr(conanfile, "revision_mode_excluded", None) |
How to reproduce it
- Create a dummy repo using git and create some dummy commits
- add a file/folder that should be packaged but shouldn't be included .gitignore
- in your conanfile.py, use
revision_mode="scm"attribute - run
conan export-pkg .. you should see the error above. - edit your conanfile.py with the `git_excluded=["directory_you_added/*"], commit this.
- repeat step 4. The error should pop-up again
- change
git_excludedtorevision_mode_excluded, commit this. - repeat step 4. The error should be gone.
Reactions are currently unavailable