}
);
- Ggit.init();
-
+ Ggit.init();
+ var a = new GitLive.Repo("/home/alan/gitlive/gitlive");
+ a.diffhead();
+ a.fetchAll();
+ return;
+ /*
GLib.Timeout.add (1, () => {
GLib.debug("Meanwhile");
return true;
var br = r.get() as Ggit.Branch;
if (br == null) {
continue;
- }
+ }
+ if (br.is_tag()) {
+ continue;
+ }
//var head = this.repo.revparse("refs/heads/" + br.get_name() ).get_id();
//var rhead = this.repo.revparse(br.get_upstream().get_name() ).get_id();
}
+
+ public void diffhead()
+ {
+ var r = this.repo.enumerate_branches(Ggit.BranchType.LOCAL);
+ Ggit.Branch head;
+ while (r.next()) {
+ var gbr = r.get() as Ggit.Branch;
+ if (gbr.is_head()) {
+ head = gbr;
+ }
+ }
+ GLib.debug("checking head=%s", head.get_name());
+ var br = this.repo.lookup_branch(head.get_name(),Ggit.BranchType.LOCAL);
+ var tree = this.repo.lookup_tree(br.get_target());
+
+
+ }
+
+
public void mergeMasterIntoHead()
{
// assumes head is not master...
}
+
+
+
/*
public bool doMergeClose(string commit_message)
{
}
GLib.debug("Remote: name=%s oid=%s local_oid=%s is_local=%s",
- br.get_name().substring(11),
+ br.get_name(),
br.get_oid().to_string(),
br.get_local_oid().to_string(),
br.is_local() ? "Y" : "n"
Idle.add((owned) callback);
return true;;
};
- new Thread<bool>("thread-example", run);
+ new Thread<bool>("loadRemoteHeads-" , run);
yield;