forked from lix-project/hydra
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:
parent
b147e71dcd
commit
f57f91f9ff
|
@ -302,12 +302,12 @@ sub fetchInputGit {
|
||||||
|
|
||||||
my $clonePath;
|
my $clonePath;
|
||||||
mkpath(scmPath);
|
mkpath(scmPath);
|
||||||
$clonePath = scmPath . "/" . sha256_hex($uri);
|
$clonePath = scmPath . "/" . sha256_hex($uri . $branch);
|
||||||
|
|
||||||
my $stdout; my $stderr;
|
my $stdout; my $stderr;
|
||||||
if (! -d $clonePath) {
|
if (! -d $clonePath) {
|
||||||
(my $res, $stdout, $stderr) = captureStdoutStderr(600,
|
(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;
|
die "Error cloning git repo at `$uri':\n$stderr" unless $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue