do not mess with klipper url, allow access via ssh or sites like gitlab, alternate to #452 #465
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.
like #452, which says
"This addresses #398 as well as including the functionality from the open PR #323 regarding ssh cloning (since, they both touch the same line of code, in effectively the same way)"
the git url for klipper can be on other schemes like
ssh://
orhttps://gitlab
.Additionally, if there is a need to use
http://
e.g. because of firewall rules etc. then the current code would not allow this, because it removes thehttp://github.com/
and addshttps://github.com/
.Actually, I would just remove the code that messes with the url.
I only inserted the addition of
https://github.com/
for compatibility in case the configuration does not contain a full url.Not sure why the
.git
was removed but not added afterwards. The official github clone url would have a.git
at the end.Also, in clone_klipper the sed command uses the
i
-flag, but not inswitch_clipper_repo_menu
.Not messing with the url would remove the duplicate code of the same thing.
Alternatively, the url could be normalized in a central function, e.g.
normalize_git_url
.