[pacman-dev] [PATCH] Use shallow clones for git sources to reduce traffic
Daniel Albers
daniel at lbe.rs
Thu Feb 14 04:29:08 EST 2013
Signed-off-by: Daniel Albers <daniel at lbe.rs>
---
scripts/makepkg.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c464ec7..b458f7f 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -465,7 +465,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 --mirror --depth 1 "$url" "$dir"; then
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
plain "$(gettext "Aborting...")"
exit 1
@@ -489,7 +489,7 @@ download_git() {
pushd "$srcdir" &>/dev/null
rm -rf "${dir##*/}"
- if ! git clone "$dir"; then
+ if ! git clone --depth 1 "$dir"; then
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
plain "$(gettext "Aborting...")"
exit 1
--
1.8.1.3
More information about the pacman-dev
mailing list