From 5022004eac9c8a75aa1d6d461b80f675b376035b Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Tue, 2 Oct 2012 20:53:01 +0200 Subject: [PATCH] libnetwork.lib: git.create_tarball(): only clone the last commit Signed-off-by: Davide Madrisan --- ChangeLog | 6 ++++++ lib/libnetwork.lib.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7d0bf31..dd87c91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,12 @@ Changes in version 1.12.5 * autospec.spec - Davide Madrisan: Add a build requirement for gettext. ++ improvement + * lib/libnetwork.lib - Davide Madrisan: + git.create_tarball(): run 'git clone --depth=1' to only clone the last + commit. We do not need to clone the whole git repository. + (Thanks to Silvan Calarco:silvan.calarco(a)mambasoft.it for spotting this.) + ------------------------------------------------------------------------------- Changes in version 1.12.4 diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in index cdcaa8a..be3f5dd 100644 --- a/lib/libnetwork.lib.in +++ b/lib/libnetwork.lib.in @@ -924,7 +924,7 @@ function git.create_tarball() { notify.note \ "${NOTE}"$"cloning git repository""\ <$git_repository> ${git_branch:+($git_branch)}${NORM}""..." - git clone ${git_branch:+-b $git_branch} "$git_repository" + git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository" [ $? -eq 0 ] || { popd &>/dev/null rm -fr $tmpgitdir