                (str "Ambiguous object prefix '" hash-prefix "'")))
       :else (second (first matches)))))
 
-(defn read-object
-  [hash-prefix]
+(defn read-object [hash-prefix]
   (let [hash-hex (complete-hash hash-prefix)
         filepath (str (git-root) 
                       "objects/"

    (.close out)
    (.toByteArray out)))

(defn write-object
  [full-text]
  (let [hash-text (sha-1-hex full-text)
        [d-name f-name] (map #(apply str %) (split-at 2 hash-text))
        filepath (str (git-root) "objects/" d-name "/" f-name)

     :mtime (file-mtime fp),
     :hash (hash-file fp)}))

(defn positions [pred coll]
  (keep-indexed (fn [idx x]
                  (when (pred x)
                    idx))
                coll))

(defn build-file-tree [file-entry]
  (let [filepath (:name file-entry)
        indexes (positions #(= \/ %) filepath)
        dirs (map #(apply str (take % filepath)) indexes)
