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

Check for Git > 2.38 #294

Merged
merged 6 commits into from
Jul 20, 2024
Merged

Conversation

alaws-scottlogic
Copy link
Contributor

Added check for Git version and unit tests.

GitVersion Exception will be raised if a compatible version is not found.

Closes #274

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.25%. Comparing base (8bfbbbc) to head (762f46c).
Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #294      +/-   ##
==========================================
+ Coverage   97.22%   97.25%   +0.02%     
==========================================
  Files          15       17       +2     
  Lines        1082     1091       +9     
==========================================
+ Hits         1052     1061       +9     
  Misses         30       30              
Files Coverage Δ
pydriller/domain/__init__.py 100.00% <100.00%> (ø)
pydriller/utils/check_git_version.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

@ishepard
Copy link
Owner

ishepard commented Jul 9, 2024

Hi! Sorry I was in vacation for the past 2 weeks 😄
Thanks for opening the PR!

Actually, what #274 refers to is the actual version of Git, not GitPython.
What you'd have to do is to check the output of git --version.

@alaws-scottlogic
Copy link
Contributor Author

Sorry, my mistake!

This should now check the git version.

subprocess.check_output(["git", "--version"]).decode("ascii").strip()
)
version_number = re.findall(r"[0-9]+\.[0-9]+", git_version)[0]
print(git_version)
Copy link
Owner

Choose a reason for hiding this comment

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

Could you remove the print from here?

@ishepard
Copy link
Owner

Thanks! All good! Errors are unrelated.

Thanks for working on it!

@ishepard ishepard merged commit c9fbefc into ishepard:master Jul 20, 2024
4 of 19 checks 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.

Add check for Git > 2.38
2 participants