projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
427e322
)
Uncommited changes synced
wip_alan_T5662_Gitlive_create_a_tracking_branch
author
Alan Knowles
<alan@roojs.com>
Tue, 15 Jan 2019 09:10:05 +0000
(17:10 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 15 Jan 2019 09:10:05 +0000
(17:10 +0800)
GitBranch.vala
patch
|
blob
|
history
diff --git
a/GitBranch.vala
b/GitBranch.vala
index
bd4be49
..
84a8331
100644
(file)
--- a/
GitBranch.vala
+++ b/
GitBranch.vala
@@
-103,7
+103,7
@@
public class GitBranch : Object
branches.get(lname).remote = rname;
}
branches.get(lname).remote = rname;
}
- if (!branches.has_key(rname)) {
+ if (!branches.has_key(rname)
|| !branches.has_key(lname)
) {
continue;
}
branches.get(lname).remoterev = branches.get(rname).lastrev;
continue;
}
branches.get(lname).remoterev = branches.get(rname).lastrev;
@@
-112,15
+112,22
@@
public class GitBranch : Object
branches.get(rname).name = lname;
}
foreach(var br in branches.values) {
branches.get(rname).name = lname;
}
foreach(var br in branches.values) {
+ GLib.debug("BRANCH:\n%s\n" , br.toString());
if (br.name.length > 0 || ! /^remotes\/origin\//.match(br.remote)) {
if (br.name.length > 0 || ! /^remotes\/origin\//.match(br.remote)) {
+ GLib.debug("SKIP - track exists");
continue;
}
continue;
}
- var newname = br.remote.replace("
/
remotes/origin/","");
+ var newname = br.remote.replace("remotes/origin/","");
if (branches.has_key(newname)) {
if (branches.has_key(newname)) {
- continue;
+ GLib.debug("SKIP - have branch already");
+ continue;
}
}
- repo.get( { "branch" ,"--track", newname, "origin/" + newname} );
- //GLib.debug("BRANCH:\n%s\n" , br.toString());
+
+
+ repo.git( { "branch" ,"--track" , newname, "origin/" + newname} );
+ //
+ br.name = newname;
+ local.set(br.name, br);
}
/*
}
/*