Skip to content

[bug] git_excluded is actually revision_mode_excluded #19231

@silabs-raashid

Description

@silabs-raashid

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:

excluded = getattr(conanfile, "revision_mode_excluded", None)
which means either the error message should change or the code should change to say which attribute is used.

How to reproduce it

  1. Create a dummy repo using git and create some dummy commits
  2. add a file/folder that should be packaged but shouldn't be included .gitignore
  3. in your conanfile.py, use revision_mode="scm" attribute
  4. run conan export-pkg .. you should see the error above.
  5. edit your conanfile.py with the `git_excluded=["directory_you_added/*"], commit this.
  6. repeat step 4. The error should pop-up again
  7. change git_excluded to revision_mode_excluded, commit this.
  8. repeat step 4. The error should be gone.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions