<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -117,8 +117,10 @@ class ApplicationController &lt; OSX::NSObject
     def setup_refs_view_menu
       [@local_branches_menu, @remote_branches_menu, @tags_menu].each { |m| m.submenu.setAutoenablesItems(false) }
       
-      heads = repo.heads.sort_by do |head|
-        head.name == 'master' ? &quot;***&quot; : head.name
+      heads = repo.heads.reject { |head| head.nil? }
+      heads = heads.sort_by do |head|
+        name = head.name rescue &quot;temp head&quot;
+        name == 'master' ? &quot;***&quot; : name
       end
       
       add_menu_item = lambda do |refs, menu|
@@ -139,7 +141,7 @@ class ApplicationController &lt; OSX::NSObject
       add_menu_item.call(repo.remotes, @branch_select.menu.itemAtIndex(1))  #remote
       add_menu_item.call(repo.tags, @branch_select.menu.itemAtIndex(2))     #tags
       
-      current_head = repo.heads.first.name.to_sym 
+      current_head = repo.heads.first.name.to_sym rescue nil
       item = @branch_select.itemAtIndex(0).submenu.itemWithTitle(current_head || :master)
       @branch_select.cell.setMenuItem(item)
     end  </diff>
      <filename>ApplicationController.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0812fc6ab092e9c4bf1e5957331a1357ecc6a3b1</id>
    </parent>
  </parents>
  <author>
    <name>Justin Palmer</name>
    <email>justin@activereload.net</email>
  </author>
  <url>http://github.com/Caged/gitnub/commit/cb3fdfc79fa0fd91ff38653c162eb046e18c13c1</url>
  <id>cb3fdfc79fa0fd91ff38653c162eb046e18c13c1</id>
  <committed-date>2008-08-22T10:30:30-07:00</committed-date>
  <authored-date>2008-08-22T10:30:30-07:00</authored-date>
  <message>Fixes #27: Launching from a repo that hasn't had an initial import</message>
  <tree>24f42fb94c83481f72884a7ae1a59652a4588bd8</tree>
  <committer>
    <name>Justin Palmer</name>
    <email>justin@activereload.net</email>
  </committer>
</commit>
