do not mess with klipper url, allow access via ssh or sites like gitlab, alternate to #452 #465

Closed
hg42 wants to merge 1 commits from master into master
hg42 commented 2024-05-06 20:28:36 +02:00 (Migrated from github.com)

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:// or https://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 the http://github.com/ and adds https://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 in switch_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.

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://` or `https://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 the `http://github.com/` and adds `https://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 in `switch_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`.
hg42 commented 2024-05-06 20:36:38 +02:00 (Migrated from github.com)

ok, I see the rewrite in python... :-)

ok, I see the rewrite in python... :-)

Pull request closed

Sign in to join this conversation.