Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Fixes small bugs created in 447befb
Browse files Browse the repository at this point in the history
  • Loading branch information
Andr3as committed Mar 21, 2017
1 parent 1b61388 commit 1e07381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion class.git.php
Expand Up @@ -918,7 +918,7 @@ private function untrackedDiff($path) {
}
} else {
$this->executeCommand('cat ' . $path);
array_push($result, "+++ ". $path);
array_push($result, "diff --git a/". $path . " b/" . $path);
foreach($this->resultArray as $index => $line) {
array_push($result, "+" . $line);
}
Expand Down
3 changes: 2 additions & 1 deletion init.js
Expand Up @@ -462,6 +462,7 @@

status: function(path) {
path = this.getPath(path);
this.files = [];
var _this = this;
$.getJSON(this.path + 'controller.php?action=status&path=' + path, function(result){
if (result.status == 'error') {
Expand Down Expand Up @@ -967,7 +968,7 @@
if (item.indexOf('+++') === 0 || item.indexOf('---') === 0 || /^index [0-9a-z]{7}..[0-9a-z]{7}/.test(item) || /^new file mode [0-9]{6}/.test(item)) {
continue;
} else if (/^diff --git a\/.+ b\/.+/.test(item)) {
element = item.match(/^diff --git a\/(.+) b\/.+/);
element = item.match(/^diff --git a\/.+ b\/(.+)/);
element = '<li class="file-info">' + element[1] + '</li>';
} else if (/^@@ -[0-9,]+ \+[0-9,]+ @@/.test(item)) {
element = '<li class="wrapper">' + element + '</li>';
Expand Down

0 comments on commit 1e07381

Please sign in to comment.