From 566c90cf6a2d3ad70f9a38e58030b2ca7f3143aa Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Thu, 27 Nov 2008 10:03:30 +0100 Subject: [PATCH] Added full debug of Scm call only when debug flag set. This is because git will return an error code when testing if a commit exists and in fact does not exist. So it means that we get an exception on all the string "commit foo" when foo is not a commit in the issue text. --- src/IDF/Scm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IDF/Scm.php b/src/IDF/Scm.php index 1a3249f..8c98f4a 100644 --- a/src/IDF/Scm.php +++ b/src/IDF/Scm.php @@ -55,7 +55,7 @@ class IDF_Scm $cache = Pluf_Cache::factory(); if (null === ($res=$cache->get($key))) { $ll = exec($command, $output, $return); - if ($return != 0) { + if ($return != 0 and Pluf::f('debug', false)) { throw new IDF_Scm_Exception(sprintf('Error when running command: "%s", return code: %d', $command, $return)); } $cache->set($key, array($ll, $return, $output));