From e1f45498c97c36235c605d8c4bf077c20bcbe1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 25 Jan 2010 13:26:37 +0000 Subject: [PATCH] Set $NIX_PREFETCH_GIT_DEEP_CLONE. --- src/lib/Hydra/Helper/AddBuilds.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 5b2d1039..de8964a9 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -306,6 +306,12 @@ sub fetchInputGit { $ENV{"NIX_PREFETCH_GIT_LEAVE_DOT_GIT"} = "1"; $ENV{"NIX_PREFETCH_SVN_LEAVE_DOT_SVN"} = "1"; + # Ask for a "deep clone" to allow "git describe" and similar + # tools to work. See + # http://thread.gmane.org/gmane.linux.distributions.nixos/3569 + # for a discussion. + $ENV{"NIX_PREFETCH_GIT_DEEP_CLONE"} = "1"; + (my $res, $stdout, $stderr) = captureStdoutStderr( "nix-prefetch-git", $uri, $revision); die "Cannot check out Git repository branch '$branch' at `$uri':\n$stderr" unless $res;