Skip to content

Commit 5fa8b85

Browse files
Fix computed data not assinged to cache (#224)
Fix assinging two data types to the same variable Fix calling of removed functions that would just return null
1 parent 0853cb9 commit 5fa8b85

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

src/Gitonomy/Git/Commit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ private function getData($name)
380380
array_shift($lines);
381381
array_shift($lines);
382382

383-
$data['bodyMessage'] = implode("\n", $lines);
383+
$this->data['bodyMessage'] = implode("\n", $lines);
384384

385-
return $data['bodyMessage'];
385+
return $this->data['bodyMessage'];
386386
}
387387

388388
$parser = new Parser\CommitParser();

src/Gitonomy/Git/Parser/CommitParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ protected function doParse()
4444
$this->consumeNewLine();
4545

4646
$this->consume('committer ');
47-
list($this->committerName, $this->committerEmail, $this->committerDate) = $this->consumeNameEmailDate();
48-
$this->committerDate = $this->parseDate($this->committerDate);
47+
list($this->committerName, $this->committerEmail, $committerDate) = $this->consumeNameEmailDate();
48+
$this->committerDate = $this->parseDate($committerDate);
4949

5050
// will consume an GPG signed commit if there is one
5151
$this->consumeGPGSignature();

src/Gitonomy/Git/Parser/LogParser.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ protected function doParse()
3737
}
3838

3939
$this->consume('author ');
40-
list($commit['authorName'], $commit['authorEmail'], $commit['authorDate']) = $this->consumeNameEmailDate();
41-
$commit['authorDate'] = $this->parseDate($commit['authorDate']);
40+
list($commit['authorName'], $commit['authorEmail'], $authorDate) = $this->consumeNameEmailDate();
41+
$commit['authorDate'] = $this->parseDate($authorDate);
4242
$this->consumeNewLine();
4343

4444
$this->consume('committer ');
45-
list($commit['committerName'], $commit['committerEmail'], $commit['committerDate']) = $this->consumeNameEmailDate();
46-
$commit['committerDate'] = $this->parseDate($commit['committerDate']);
45+
list($commit['committerName'], $commit['committerEmail'], $committerDate) = $this->consumeNameEmailDate();
46+
$commit['committerDate'] = $this->parseDate($committerDate);
4747

4848
// will consume an GPG signed commit if there is one
4949
$this->consumeGPGSignature();

src/Gitonomy/Git/Parser/TagParser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ protected function doParse()
4040
$this->consumeNewLine();
4141

4242
$this->consume('tagger ');
43-
list($this->taggerName, $this->taggerEmail, $this->taggerDate) = $this->consumeNameEmailDate();
44-
$this->taggerDate = $this->parseDate($this->taggerDate);
43+
list($this->taggerName, $this->taggerEmail, $taggerDate) = $this->consumeNameEmailDate();
44+
$this->taggerDate = $this->parseDate($taggerDate);
4545

4646
$this->consumeNewLine();
4747
$this->consumeNewLine();

src/Gitonomy/Git/Reference/Tag.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ private function getData($name)
191191
array_shift($lines);
192192
array_pop($lines);
193193

194-
$data['bodyMessage'] = implode("\n", $lines);
194+
$this->data['bodyMessage'] = implode("\n", $lines);
195195

196-
return $data['bodyMessage'];
196+
return $this->data['bodyMessage'];
197197
}
198198

199199
$parser = new TagParser();

src/Gitonomy/Git/ReferenceBag.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,7 @@ protected function initialize()
354354
$parser = new Parser\ReferenceParser();
355355
$output = $this->repository->run('show-ref');
356356
} catch (RuntimeException $e) {
357-
$output = $e->getOutput();
358-
$error = $e->getErrorOutput();
359-
if ($error) {
360-
throw new RuntimeException('Error while getting list of references: '.$error);
361-
}
357+
$output = null;
362358
}
363359
$parser->parse($output);
364360

0 commit comments

Comments
 (0)