From: Ralph Corderoy Date: Mon, 24 Oct 2016 08:59:44 +0000 (+0100) Subject: build_nmh: If cloning with git, make a shallow clone. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a1bcd496f6a3accb1dc90807402be2afa424fd34?hp=f2ac699d39bce1406ba54ff6cf9046c954361411 build_nmh: If cloning with git, make a shallow clone. --- diff --git a/docs/contrib/build_nmh b/docs/contrib/build_nmh index 358531dc..fc871f8f 100755 --- a/docs/contrib/build_nmh +++ b/docs/contrib/build_nmh @@ -131,7 +131,7 @@ else [ "$verbose" -eq 0 ] && git_opts=--quiet [ "$branch" == master ] || git_opts="${git_opts:+$git_opts }--branch $branch" - if "$gitdir"/git clone $git_opts "git://$gitrepo/nmh.git"; then + if "$gitdir"/git clone --depth 1 $git_opts "git://$gitrepo/nmh.git"; then cd nmh || die "failed to clone nmh" printf "commit %s\n" `git log --max-count=1 --pretty=format:%H` else