X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitBranch.vala;fp=GitBranch.vala;h=18aa32c1f15350b1155e95ca4355d185fdc394ea;hp=84a833129db97fb0d3722dedf5114407cf1d396f;hb=7a27f168cb9f240824d180266c59997931cc3eb1;hpb=d33736b91e5bdee2a751dce3d4199d22244ca786 diff --git a/GitBranch.vala b/GitBranch.vala index 84a83312..18aa32c1 100644 --- a/GitBranch.vala +++ b/GitBranch.vala @@ -35,6 +35,7 @@ public class GitBranch : Object public bool is_remote; public string remote = ""; public string remoterev = ""; + public string age = ""; public string toString() { @@ -44,7 +45,8 @@ public class GitBranch : Object "lastrev: " + lastrev + "\n" + "name: " + name + "\n" + "remote: " + remote + "\n" + - "remoterev: " + remoterev + "\n"; + "remoterev: " + remoterev + "\n" + + "age: " + age + "\n" ; } @@ -86,7 +88,7 @@ public class GitBranch : Object var bl = repo.git({ "for-each-ref", - "--format", "%(refname:short):remotes/%(upstream:short)", + "--format", "%(refname:short):remotes/%(upstream:short):remotes/%(authordate:relative)", "refs/heads" }).split("\n"); @@ -97,10 +99,12 @@ public class GitBranch : Object var lname= ar[0]; var rname = "remotes/" + ar[1]; + //print(rname); // we should always have a local version of it. if (branches.has_key(lname)) { branches.get(lname).remote = rname; + branches.get(lname).age = ar[2]; } if (!branches.has_key(rname) || !branches.has_key(lname) ) {