[pacman-dev] [PATCH] Add support for setting git-clone options to be used by makepkg (e.g. allowing user to set options like --depth=1)
Clayton Craft
craftyguy at gmail.com
Fri Oct 9 02:55:26 UTC 2015
Signed-off-by: Clayton Craft <craftyguy at gmail.com>
---
etc/makepkg.conf.in | 3 +++
scripts/libmakepkg/source/git.sh.in | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 71ec624..4520318 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -19,6 +19,9 @@ DLAGENTS=('ftp::/usr/bin/curl -qfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o
# /usr/bin/lftpget -c
# /usr/bin/wget
+#-- Git-clone options
+GITCLONEOPTS=""
+
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
diff --git a/scripts/libmakepkg/source/git.sh.in b/scripts/libmakepkg/source/git.sh.in
index 4d2f2d7..b1c7c38 100644
--- a/scripts/libmakepkg/source/git.sh.in
+++ b/scripts/libmakepkg/source/git.sh.in
@@ -42,7 +42,7 @@ download_git() {
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
- if ! git clone --mirror "$url" "$dir"; then
+ if ! git clone ${GITCLONEOPTS} --mirror "$url" "$dir"; then
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
plain "$(gettext "Aborting...")"
exit 1
--
2.6.1
More information about the pacman-dev
mailing list