X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitRepo.vala;h=e51d150385e785aff1147aaf85f43718688eed04;hp=4e018e547b12347508e44dcf9b9e84cfab574443;hb=08415bc285bb4d01c01b0965bdd3789a63e3dba7;hpb=687788b547e87d4c8f915e175d8896ae7ffdbd47 diff --git a/GitRepo.vala b/GitRepo.vala index 4e018e54..e51d1503 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -22,11 +22,12 @@ public class GitRepo : Object public Gee.HashMap ignore_files; public GitBranch currentBranch; + public RooTicket? activeTicket; public static GitRepo singleton() { if (_GitRepo == null) { - _GitRepo = new GitRepo(); + _GitRepo = new GitRepo.single(); _GitRepo.cache = new Gee.HashMap(); } return _GitRepo; @@ -137,9 +138,9 @@ public class GitRepo : Object return new GitRepo(path); } - - - + private GitRepo.single() { + // used to create the signleton + } /** * constructor: * @@ -162,11 +163,17 @@ public class GitRepo : Object var cache = GitRepo.singleton().cache; //Repo.superclass.constructor.call(this,cfg); - if ( !cache.has_key(path) ) { - cache.set( path, this); + if ( !cache.has_key(path) ) { + cache.set( path, this); } + this.loadBranches(); } + public bool is_wip_branch() + { + return this.currentBranch.name.has_prefix("wip_") + + } public bool is_autocommit () { @@ -200,6 +207,10 @@ public class GitRepo : Object } } + + + + public string branchesToString() { var ret = "";