Enhance get_source_tarball_from_git to ensure that Git repo URL does not contain double slashes due to trailing slash in source URL#5097
Merged
boegel merged 1 commit intoeasybuilders:developfrom Jan 28, 2026
Conversation
…ash in source URL
get_source_tarball_from_git to ensure that Git repo URL does not contain double-slahses due to trailing slash in source URL
get_source_tarball_from_git to ensure that Git repo URL does not contain double-slahses due to trailing slash in source URLget_source_tarball_from_git to ensure that Git repo URL does not contain double slashes due to trailing slash in source URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've encountered this when trying to install a package that requires a
git lfs pullbefore installing in order to bring in some optional files.If the
urlingit_configis written with a trailing slash, the final url will contain a double slash, egwhere the URL will result in
https://github.com/SOME_USER//SOME_REPOGIT deals with this fine, by collapsing the double-slash into one when interpreting the URL, but the version with the double-slash is what is written by
git clonein the.git/configThis causes a generic connection error when calling
git lfs pulldue to it not being able to handle the double-slash in the URL.This minor fix ensures that trailing slashes in the
urlofgit_configs is properly removed as it is re-added when joining the url with the repo_nameEven if there exists url's where the double-slash is required i would argue that we should not rely on the string joining logic for it and probably add it to the
repo_nameAn alternative would be to check whether the
urlends with a slash and only add an extra one if it does not