mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Better filename handling in commit logs, fixes #35
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -341,6 +341,8 @@ class Repository
|
||||
}
|
||||
|
||||
$diff = new Diff;
|
||||
preg_match('/^diff --[\S]+ (a\/)?([\S]+)( b\/)?/', $log, $name);
|
||||
$diff->setFile($name[2]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user