Better filename handling in commit logs, fixes #35

This commit is contained in:
Klaus Silveira
2012-06-07 02:32:30 -03:00
parent df8f74a9cb
commit 484c72679a
2 changed files with 7 additions and 1 deletions

View File

@@ -45,7 +45,6 @@ class Diff
public function setNew($new)
{
$this->new = $new;
$this->file = substr($new, 6);
}
public function getNew()
@@ -53,6 +52,11 @@ class Diff
return $this->new;
}
public function setFile($file)
{
$this->file = $file;
}
public function getFile()
{
return $this->file;

View File

@@ -341,6 +341,8 @@ class Repository
}
$diff = new Diff;
preg_match('/^diff --[\S]+ (a\/)?([\S]+)( b\/)?/', $log, $name);
$diff->setFile($name[2]);
continue;
}