X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitBranch.vala;fp=GitBranch.vala;h=a2ec31570b0e78cefb746a4fb55d17c1709557a3;hp=6a2dfa1357ea5b4486228f44eed72d40a0d485ac;hb=ce0a9ed7cbde853bab1ba31d0a14fd0a73d7578c;hpb=cf448ce21966e7b9fe9ca9e8894a4d53871aead4 diff --git a/GitBranch.vala b/GitBranch.vala index 6a2dfa13..a2ec3157 100644 --- a/GitBranch.vala +++ b/GitBranch.vala @@ -79,17 +79,21 @@ public class GitBranch : Object var rem = repo.repo.lookup_remote("origin"); var cb = new GitCallbacks(repo); - rem.connect(Ggit.Direction.FETCH, cb, null, null); - var remote_heads = rem.list(); - foreach(var rh in remote_heads) { - var rn = rh.get_name(); - if (!rn.has_prefix("refs/heads/")) { - continue; - } - remotes.set(rn.substring(11), rh.get_oid()); - remotes_used.set(rn.substring(11), false); + try { + rem.connect(Ggit.Direction.FETCH, cb, null, null); + var remote_heads = rem.list(); + foreach(var rh in remote_heads) { + var rn = rh.get_name(); + if (!rn.has_prefix("refs/heads/")) { + continue; + } + remotes.set(rn.substring(11), rh.get_oid()); + remotes_used.set(rn.substring(11), false); - } + } + } catch (Error e) { + GLib.debug("Failed to fetch remotes continuing on "); + } var r = repo.repo.enumerate_branches(Ggit.BranchType.LOCAL);