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

feat: diplays the repo if GitError #621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SteBaum
Copy link
Contributor

@SteBaum SteBaum commented Sep 9, 2024

Which issue(s) this PR fixes

Fixes None

Additional comments

If an error occurs with the is_clean function of the GitRepository class, the concerned repository is printed in the trace.

Agreements

@SteBaum SteBaum self-assigned this Sep 9, 2024
Copy link
Contributor

@PaulFarault PaulFarault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Printing the source repository seems reasonable.

However, could you please provide an example of a case where this exception is raised?

@SteBaum
Copy link
Contributor Author

SteBaum commented Oct 18, 2024

Yes sorry I should have copied the error I had. I had this error when I was executing TDP-lib in a container with a different user as on my host where tdp_vars were located and attached to the container through a volume. It could not access any git repository in this case. it had nothing to do with the code in tdp-lib and all git repositories were affected but in the case that only one would be affected we would not know which one it is, so this error message tells us precisely which one is concerned.

@PaulFarault
Copy link
Contributor

PaulFarault commented Oct 18, 2024

Then I'm not sure that this PR is that useful. We never encountered this type of error and even if it occurs, your PR it only covering the is_clean method.

Furthermore, we already know to which repository the error comes from as the method is part of the Repository class.

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.

2 participants