-
Notifications
You must be signed in to change notification settings - Fork 8
Add minimum git version requirement check #39
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a minimum Git version requirement check to ensure users have Git 2.28.0 or later installed, which is necessary for sparse checkout functionality with the --filter option used by the application.
Changes:
- Added a new
Version.parse()method to parse plain version strings without a 'v' prefix - Replaced
is_git_installed()withget_git_version()that returns the installed Git version or None - Integrated version checking into the
check gitcommand to validate the minimum version requirement
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/utils/version.py | Added parse() method to parse plain version strings (e.g., '1.2.3') alongside existing parse_version_string() for 'v'-prefixed strings |
| app/utils/git.py | Introduced MIN_GIT_VERSION constant (2.28.0) and replaced boolean is_git_installed() with get_git_version() that extracts version from git --version output |
| app/commands/check/git.py | Updated git check command to retrieve git version, validate it meets minimum requirement, and display appropriate error messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
desmondwong1215
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have tested it and it works as intended.
Fixes git-mastery/git-mastery#60
git sparse-checkoutandgit clone <...> --sparseare features that are introduced in 2.25.0--filterin sparse checkout (which we use in app) is also not working until 2.28.0 (source: Sparse checkout not working with git version between 2.25 and 2.28 actions/checkout#1386)Would prefer not to set too strict restrictions on the git version (eg. must always be latest version, etc.) as additional features may not be required for the app, and thus it's not a requirement for users to update their git.