make fetchgit and nix-prefetch-git use --depth 1 to receive only a shallow clone cutting history

svn path=/nixpkgs/trunk/; revision=16047
This commit is contained in:
Marc Weber 2009-06-26 00:56:54 +00:00
parent 6c0912ee9c
commit c59fb90f62
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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