         (.setSelectionMode TreeSelectionModel/SINGLE_TREE_SELECTION))))
 
 (defn update-content!
-  [^JTree sidebar content ^Git git ^RevCommit commit]
+  [^JTree sidebar content ^FileRepository repo ^RevCommit commit]
   (.setText content (clj->html (utils/get-string :loading)))
   (future
-    (let [s (create-html git commit)]
+    (let [s (create-html repo commit)]
       (s/invoke-later
         (when (= commit (selected-commit sidebar))
           (doto content

            forms]]))

(defn create-html
  [^Git git ^RevCommit commit]
  (let [out (ByteArrayOutputStream.)
        repo (.getRepository git)
        df (doto (DiffFormatter. out)
             (.setRepository repo))
        [old-tree new-tree] (diff-trees repo commit)

          (reify TreeSelectionListener
            (valueChanged [this e]
              (->> (some-> e .getPath .getLastPathComponent .getUserObject)
                   (update-content! sidebar content repo)))))
        (.setSelectionRow (or selected-row 0))))))

(def ^:dynamic *widgets* [:pull :push :close])
