projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
373aeca
)
sync
author
Alan Knowles
<alan@roojs.com>
Tue, 30 Oct 2018 08:58:58 +0000
(16:58 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 30 Oct 2018 08:58:58 +0000
(16:58 +0800)
GitRepo.vala
patch
|
blob
|
history
config1.builder
patch
|
blob
|
history
diff --git
a/GitRepo.vala
b/GitRepo.vala
index
3602e7f
..
989a32b
100644
(file)
--- a/
GitRepo.vala
+++ b/
GitRepo.vala
@@
-152,6
+152,8
@@
public class GitRepo : Object
public void loadBranches()
{
public void loadBranches()
{
+ this.branches = new Gee.HashMap<string,GitBranch>();
+
string[] cmd = { "branch", "--no-color", "--verbose", "--no-abbrev" , "-a" };
var res = this.git( cmd );
var lines = res.split("\n");
string[] cmd = { "branch", "--no-color", "--verbose", "--no-abbrev" , "-a" };
var res = this.git( cmd );
var lines = res.split("\n");
@@
-160,12
+162,28
@@
public class GitRepo : Object
if (!br.parseBranchListItem(lines[i])) {
continue;
}
if (!br.parseBranchListItem(lines[i])) {
continue;
}
+ GLib.debug("add branch %s", br.realName());
+
branches.set(br.realName(), br);
if (br.active) {
this.currentBranch = br;
}
}
branches.set(br.realName(), br);
if (br.active) {
this.currentBranch = br;
}
}
+ }
+ public string branchesToString()
+ {
+ var ret = "";
+ foreach( var br in this.branches.values) {
+ if (br.name == "") {
+ continue;
+ }
+ ret += ret.length > 0 ? "," : "";
+ ret += br.name;
+
+ }
+ return ret;
+
}
/**
}
/**
diff --git
a/config1.builder
b/config1.builder
index
83f17f7
..
0362cd2
100644
(file)
--- a/
config1.builder
+++ b/
config1.builder
@@
-13,7
+13,9
@@
"..//gitlive/StatusIcon.vala",
"..//gitlive/WindowLog.vala",
"..//gitlive",
"..//gitlive/StatusIcon.vala",
"..//gitlive/WindowLog.vala",
"..//gitlive",
- "..//gitlive/Clones.vala"
+ "..//gitlive/Clones.vala",
+ "..//gitlive/GitBranch.vala",
+ "..//gitlive/NewBranch.vala"
],
"packages" : [
]
],
"packages" : [
]