-
Notifications
You must be signed in to change notification settings - Fork 993
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
[bug] git.get_url_and_commit throws exception for different git configs #15261
Comments
The root cause is the
The problem is that the status.branch git config option will include the branch information in A solution would be to use @conan-io/barbarians can you queue this? I'd like to raise a PR with the fix. Since I am already there I will consider all git status config entries to see if any problems like this can arise from other options. |
Hi @Solviana Thanks very much for your report and your investigation. It makes sense that there can be some scenarios and configurations that could make the It seems the |
Based on the Github Git mirror the status.branch was introduced in ec85d07, so the feature is at least 10 years old (Git 1.8.4). If this is acceptable for you I'd go ahead with the PR. Going over the git-config documentation I'd include --untracked-files flag as well. |
Sounds good, go for it, many thanks! |
…5271) Fix dirty repo handling (conan-io#15261)
Environment details
Steps to reproduce
1. Set git config "status.branch" to true:
git config --global status.branch true
2. Use Git.get_url_and_commit() in your conanfile:
`
from conan.tools.scm import Git
3. Execute conan create. My example (copied from a python subprocess call):
Observed result (even though the repo is not dirty, I ran git clean -fd before):
Logs
No response
The text was updated successfully, but these errors were encountered: