Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2023-05-24 02:40:52 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-24 02:50:08 +0200
commita08bc2acf49c68061284c7991d41dc78c46ae2b4 (patch)
tree2f7a6480de3cfc5d6922d719ad411ac8882aa7a0 /contrib
parentf11cb9018e7d926b6b61660e418d8beb7b39ea62 (diff)
feature(clone): add protocol option to force cloning over HTTPS
This is a rather quick and simple implementation to override the current logic and force clone with HTTPS. Allowing to explicitly clone over HTTPS is currently required to unblock reproducible builds where no ssh keys and GitLab user accounts are set up as of now. Hence this quick solution comes into play to mitigate the regression on reproducible builds builders. Revisit the overall auto detection and protocol logic approach for a later release related to some ideas floating around in pending merge-requests. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/bash/devtools.in7
-rw-r--r--contrib/completion/zsh/_devtools.in2
2 files changed, 9 insertions, 0 deletions
diff --git a/contrib/completion/bash/devtools.in b/contrib/completion/bash/devtools.in
index 17f863f..3faad27 100644
--- a/contrib/completion/bash/devtools.in
+++ b/contrib/completion/bash/devtools.in
@@ -265,6 +265,7 @@ _pkgctl_repo_cmds=(
_pkgctl_repo_clone_args=(
-m --maintainer
+ --protocol
--switch
-u --unprivileged
--universe
@@ -273,6 +274,7 @@ _pkgctl_repo_clone_args=(
)
_pkgctl_repo_clone_args__maintainer_opts() { :; }
_pkgctl_repo_clone_args_m_opts() { _pkgctl_repo_clone_args__maintainer_opts; }
+_pkgctl_repo_clone_args__protocol_opts() { _devtools_completions_protocol; }
_pkgctl_repo_clone_args__switch_opts() { :; }
_pkgctl_repo_clone_args__jobs_opts() { :; }
_pkgctl_repo_clone_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; }
@@ -280,9 +282,11 @@ _pkgctl_repo_clone_opts() { _devtools_completions_all_packages; }
_pkgctl_repo_configure_args=(
+ --protocol
-j --jobs
-h --help
)
+_pkgctl_repo_configure_args__protocol_opts() { _devtools_completions_protocol; }
_pkgctl_repo_configure_args__jobs_opts() { :; }
_pkgctl_repo_configure_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; }
_pkgctl_repo_configure_opts() { _filedir -d; }
@@ -363,6 +367,9 @@ _devtools_completions_build_repo() {
_devtools_completions_all_packages() {
mapfile -t COMPREPLY < <(compgen -W "$(pacman -Sql)" -- "$cur")
}
+_devtools_completions_protocol() {
+ mapfile -t COMPREPLY < <(compgen -W "https" -- "$cur")
+}
__devtools_complete() {
local service=$1
diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in
index 240f781..a473bc2 100644
--- a/contrib/completion/zsh/_devtools.in
+++ b/contrib/completion/zsh/_devtools.in
@@ -108,6 +108,7 @@ _pkgctl_repo_switch_args=(
_pkgctl_repo_clone_args=(
'(-m --maintainer=)'{-m,--maintainer=}'[Clone all packages of the named maintainer]:maintainer:'
+ '--protocol[Clone the repository over https]:proto:(https)'
'--switch=[Switch the current working tree to a specified version]'
'--universe[Clone all existing packages, useful for cache warming]'
'(-j --jobs)'{-j,--jobs}'[Run up to N jobs in parallel (default: number of processing units)]:jobs:'
@@ -116,6 +117,7 @@ _pkgctl_repo_clone_args=(
)
_pkgctl_repo_configure_args=(
+ '--protocol[Configure remote url to use https]:proto:(https)'
'(-j --jobs)'{-j,--jobs}'[Run up to N jobs in parallel (default: number of processing units)]:jobs:'
'(-h --help)'{-h,--help}'[Display usage]'
'*:git_dir:_files -/'