           (.write wrtr bdata))
         (unset-writable filepath)))
     filepath))
-
-(defn write-tree [tree-struct]
-  (-> tree-struct
-      (tree-data)
-      (byte-array)
-      (write-object)))
 
 (defn write-blob [text]
   (write-object (str "blob " (count text) "\0" text)))

        (conj out e)
        (recur (f-entry r) (conj out e))))))

(def commit blob)

(defn blob [hash-hex]
  (to-str (second (read-object hash-hex))))

(defn branch [b]
  (let [filepath (str (git-root) "refs/heads/" b)]

        data (concat header-bs body)
        ]
    data))

(defn write-tree [tree-struct]
  (-> tree-struct
      (tree-data)
      (byte-array)
      (write-object)))

(defn hash-tree [tree-struct]
  (->> tree-struct
