From 3e0f5f664a7991add2e1da54fd5c6b22eabed7e7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 Jul 2015 00:44:40 +0200 Subject: [PATCH] GitInput plugin: Don't clone during getCommits This doesn't work if hydra-queue-runner has no write access to the scm directory, and in any case races with the evaluator. --- src/lib/Hydra/Plugin/GitInput.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Plugin/GitInput.pm b/src/lib/Hydra/Plugin/GitInput.pm index 94dad9c3..7cb4719a 100644 --- a/src/lib/Hydra/Plugin/GitInput.pm +++ b/src/lib/Hydra/Plugin/GitInput.pm @@ -156,7 +156,7 @@ sub getCommits { my ($uri, $branch, $deepClone) = _parseValue($value); - my $clonePath = $self->_cloneRepo($uri, $branch, $deepClone); + my $clonePath = getSCMCacheDir . "/git/" . sha256_hex($uri); my $out = grab(cmd => ["git", "log", "--pretty=format:%H%x09%an%x09%ae%x09%at", "$rev1..$rev2"], dir => $clonePath);