Git.vala
[gitlive] / Git.vala
index 706afd6..4b7c70d 100644 (file)
--- a/Git.vala
+++ b/Git.vala
@@ -90,10 +90,11 @@ namespace  GitLive {
                                var br = r.get() as Ggit.Branch;
                                //var head = this.repo.revparse("refs/heads/" + br.get_name() ).get_id();
                                //var rhead = this.repo.revparse(br.get_upstream().get_name() ).get_id();
-                                 GLib.debug("got branch: H=%s name = %s upstream = %s oid = %s ", 
+                           GLib.debug("got branch: H=%s name = %s upstream = %s oid = %s ", 
                                                br.is_head() ? "Y" : "n",
-                                               br.get_name(), br.get_upstream().get_name(), 
-                                       head.to_string());
+                                               br.get_name(), 
+                                               br.get_upstream().get_name().substring(29), 
+                                           br.get_target().to_string());
                                this.branches.add(br);
                                if (br.is_head()) {
                                        GLib.debug("HEAD= %s", br.get_name());
@@ -294,10 +295,22 @@ namespace  GitLive {
                        var r = this.repo.lookup_remote("origin");
                        r.connect(Ggit.Direction.FETCH, this.callbacks, null, null);
                        this.remote_heads = r.list();
-               
+                       
+                       foreach(var br in this.remote_heads) {
+                               if (!br.get_name().has_prefix("refs/heads/")) {
+                                       continue;
+                               }
+                               
+                               GLib.debug("Remote: name=%s  oid=%s local_oid=%s is_local=%s",
+                                       br.get_name().substring(11),
+                                       br.get_oid().to_string(),
+                                       br.get_local_oid().to_string(),
+                                       br.is_local() ? "Y" : "n"
+                                       );
+                                       }
+                       
                }
-               
-               
+                
                
                Ggit.Branch? getBranch(string remote_name, string remote_branch_name)
                {