From 53329ecc618abf4fd5e4a6644d76413c43ad7b92 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 5 Apr 2012 15:49:48 +0200 Subject: [PATCH] Use git fetch --all to update local clone in stead of git pull. Also, do not use --branch in initial clone. --- src/lib/Hydra/Helper/AddBuilds.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 39ed2412..687e0ed3 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -328,14 +328,14 @@ sub fetchInputGit { my $stdout; my $stderr; if (! -d $clonePath) { (my $res, $stdout, $stderr) = captureStdoutStderr(600, - ("git", "clone", "--branch", $branch, $uri, $clonePath)); + ("git", "clone", $uri, $clonePath)); die "Error cloning git repo at `$uri':\n$stderr" unless $res; } # git pull + check rev chdir $clonePath or die $!; # !!! urgh, shouldn't do a chdir (my $res, $stdout, $stderr) = captureStdoutStderr(600, - ("git", "pull")); + ("git", "fetch", "--all")); die "Error pulling latest change git repo at `$uri':\n$stderr" unless $res; (my $res1, $stdout, $stderr) = captureStdoutStderr(600,