Change fetchInputGit' to do git clone -b BRANCH' instead of `git clone'.

Suggested by Vladimír Čunát <vcunat@gmail.com>.
This commit is contained in:
Ludovic Courtès 2011-03-10 15:06:54 +00:00
parent b147e71dcd
commit f57f91f9ff

View file

@ -302,12 +302,12 @@ sub fetchInputGit {
my $clonePath;
mkpath(scmPath);
$clonePath = scmPath . "/" . sha256_hex($uri);
$clonePath = scmPath . "/" . sha256_hex($uri . $branch);
my $stdout; my $stderr;
if (! -d $clonePath) {
(my $res, $stdout, $stderr) = captureStdoutStderr(600,
("git", "clone", $uri, $clonePath));
("git", "clone", "--branch", $branch, $uri, $clonePath));
die "Error cloning git repo at `$uri':\n$stderr" unless $res;
}