This can considerably speed up the cloning process, as makepkg won't
have to download the whole history.

Signed-off-by: Eric Engestrom <[email protected]>
---
 scripts/libmakepkg/source/git.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/libmakepkg/source/git.sh.in 
b/scripts/libmakepkg/source/git.sh.in
index cc27663..ad31c34 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 --depth 1 --mirror "$url" "$dir"; then
                        error "$(gettext "Failure while downloading %s %s 
repo")" "${repo}" "git"
                        plain "$(gettext "Aborting...")"
                        exit 1
-- 
2.8.0

Reply via email to