-
-
Notifications
You must be signed in to change notification settings - Fork 527
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(git_utils): Support for blolbless clone mode in git_cmd_clone #640
base: develop
Are you sure you want to change the base?
Conversation
…ptions Signed-off-by: Aleksei Sviridkin <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Thank you for the PR and for that detailed description. I think this is a good idea and as you can see this is a feature that was requested for a long time. Though, im currently not sure if there will be a significant downside if we make depth 1 the default. One thought i had was, if we should show the user a dialog if he want's to do a shallow clone or not, with a user friendly and not too technical description about what that means and when it would be usefull to do that. |
…-branch parameters Signed-off-by: Aleksei Sviridkin <[email protected]>
A little update for a function. Now you can use it anywhere without any behavior changes and set the depth and branch options where it's already safe. Also, fully documented in code. P.S. I was so frustrated with the full clone that I didn’t check any issues and just submitted this PR to your repository. I’m glad to see I’m not the only one and that the issue has already been opened. |
Hi, so i had a talk with the Moonraker maintainer. We shouldn't use shallow clones at all. The general recommendation was to use a blobless clone instead which would reduce download size and be faster than a regular clone. Also, it was said that there should be no general issue with using the blobless clone by default, so that could become the new default way of cloning. Moonraker itself uses blobless clones with the update managers "hard reset" functionality. https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone (see "Quick Summary") |
…tion Signed-off-by: Aleksei Sviridkin <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
…ocal_tags function Signed-off-by: Aleksei Sviridkin <[email protected]>
@dw-0 sorry for a long delay, here is the change. I'm not sure where it's save to use new mode, so you can highlight those places and I'll update them. Or this can be done in separate PR |
I don't want to offend you but i have to ask: is this change (or this whole PR) something that was AI generated? |
@dw-0 the description only :) The code is hand crafted by myself :)) |
@lexfrei I see :) I was just wondering because of the typo
No, the syntax you used and how you wrote it is actually totally fine. It's just that the code won't work. |
…umentation for clarity Signed-off-by: Aleksei Sviridkin <[email protected]>
Heh, my typo. The command was tested long ago and today I just updated the code without any testing. My bad |
Support for
blolbless clone
ModeOverview
This PR introduces an optional
blolbless
parameter to thegit_cmd_clone
function. When enabled, it adds the--blolbless
flag to the git clone command. The function’s docstring has also been updated to document this new parameter.Changes
blolbless
Parameter:The
git_cmd_clone
function now accepts a booleanblolbless
parameter. If set toTrue
, it appends the--blolbless
flag to thegit clone
command.The function’s documentation has been revised to include details about the new
blolbless
parameter.Rationale
The new parameter allows users to enable or disable the
--blolbless
flag based on their specific needs or environment.The updated docstring ensures that users are aware of the new parameter and understand how it affects the cloning process.
Testing Instructions
blolbless=True
:Verify that the clone command includes the
--blolbless
flag and that the repository is cloned as expected.blolbless=False
or unset:Confirm that the function behaves as before, without adding any extra flags to the command.
Conclusion
By introducing the
blolbless
parameter, this PR provides an additional customization option for the cloning process. Please review and test these changes to ensure they integrate smoothly into existing workflows.