From 33f684c498f833686caacb4d0da1e9294e4185a2 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 28 Dec 2018 15:11:19 +0800 Subject: [PATCH] GitRepo.vala --- GitRepo.vala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GitRepo.vala b/GitRepo.vala index bdfd2faa..522e58a4 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -601,19 +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\"" }); + start = head.split(" ")[0]; var start = ""; for (var i = 0; i < lines.length; i++) { var cols = lines[i].split(" "); if (cols.length > 2) { - start = cols[0]; + end = cols[0]; break; } } - if (start == "") { + if (end == "") { var last = lines[lines.length-1]; - start = head.split(" ")[0]; + var end = last.split(" ")[1]; } - var end = last.split(" ")[1]; + return this.git({ "diff" , start+".."+end, "--no-color" }); } catch(Error ee) { GitMonitor.gitmonitor.pauseError(ee.message); -- 2.39.2