From c59fb90f629ef7b143fe01fabf32c1a0c4908b18 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 26 Jun 2009 00:56:54 +0000 Subject: [PATCH] make fetchgit and nix-prefetch-git use --depth 1 to receive only a shallow clone cutting history svn path=/nixpkgs/trunk/; revision=16047 --- pkgs/build-support/fetchgit/builder.sh | 2 +- pkgs/build-support/fetchgit/nix-prefetch-git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index 08a1cc5d3419..e43a2e37726c 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -2,7 +2,7 @@ source $stdenv/setup header "exporting $url (rev $rev) into $out" -git clone "$url" $out +git clone --depth 1 "$url" $out if test -n "$rev"; then cd $out git checkout $rev diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 6e88b1d9c2ff..29b3472596d4 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -36,7 +36,7 @@ if test -z "$finalPath"; then trap "rm -rf $tmpPath" EXIT # Perform the checkout. - git clone "$url" $tmpFile + git clone --depth 1 "$url" $tmpFile if test -n "$rev"; then cd $tmpFile echo $tmpFile