 ;; (-> (get-all-files)
 ;;     (.then #(js/console.log %)))
 
-;; (-> (get-file-by-path "test2.md")
+;; (-> (get-file-by-path "test.md")
 ;;     (.then #(js/console.log (clj->js %))))
+
+;; (-> (get-file-by-sha "96a357d8e67de8d4f3992cf4255019bbcae6da08")
+;;     (.then #(js/console.log (clj->js %))))
+
+;; (-> (open-repo)
+;;     (get-entry-by-sha "96a357d8e67de8d4f3992cf4255019bbcae6da08")
+;;     (.then #(build-entry-data %))
+;;     (.then #(js/console.log (clj->js %)))
+;;     (.catch #(js/console.error %)))

  (-> (.resolve path repo-path)
      (nodegit.Repository.open)
      (.catch #(js/console.error "Something went wrong opening repo: " %))))

(defn get-entry-by-path
  "Returns a promise for the entry specified by filepath in repo."

                                         :created_at (:date (last file-history))
                                         :history file-history)))))))

(defn get-file-by-sha [sha]
  (-> (open-repo)
      (get-entry-by-sha sha)
      (.then #(build-entry-data %))))

(defn get-file-by-path [filepath]
  (let [rv (transient {})]
    (-> (open-repo)
