2 represent a git branch..
6 public class GitBranch : Object
10 public bool active = false;
11 public string lastrev = "";
12 public string name = "";
13 public string remote = "":
14 public string remoterev = "";
16 public GitBranch(GitRepo repo)
21 public bool parseBranchListItem(str)
26 this.active = str[0] == '*';
28 var bits = Regex.split_simple ("[ \t]+", str.substring(2).strip());
29 if (bits[1] == "->") { // it's an alias.. eg. remotes/origin/HEAD -> origin/master..
33 this.lastrev = parts[1];
34 if (parts[0].has_prefix("remotes/")) {
35 this.remote = parts[0];
43 return this.name = "" ? this.remote : this.name;