X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=GitRepo.vala;h=522e58a47e7273573b6d5a555d0b500b7ab5c473;hb=33f684c498f833686caacb4d0da1e9294e4185a2;hp=801fe8dff0690a0c23de3edfaa9be5b5a7f58db9;hpb=b6bae436bc139a85d759be17a0e21240978b15fb;p=gitlive diff --git a/GitRepo.vala b/GitRepo.vala index 801fe8df..522e58a4 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -601,9 +601,20 @@ public class GitRepo : Object try { var lines = this.git({"log", "master...", "--pretty=format:\"%H %P\"" }).split("\n");; var head = this.git({"log", "-1", "--pretty=format:\"%H %P\"" }); - var last = lines[lines.length-1]; - var start = head.split(" ")[0]; - var end = last.split(" ")[1]; + start = head.split(" ")[0]; + var start = ""; + for (var i = 0; i < lines.length; i++) { + var cols = lines[i].split(" "); + if (cols.length > 2) { + end = cols[0]; + break; + } + } + if (end == "") { + var last = lines[lines.length-1]; + var end = last.split(" ")[1]; + } + return this.git({ "diff" , start+".."+end, "--no-color" }); } catch(Error ee) { GitMonitor.gitmonitor.pauseError(ee.message);