         
     (map #(do (assert (= (count %) SHA-1-HEX-LENGTH)) %) hashes)))
 
-(defn complete-hash
-  [hash-prefix]
+(defn complete-hash [hash-prefix]
   (assert (<= (count hash-prefix) SHA-1-HEX-LENGTH))
   (let [len (count hash-prefix)
         all (all-objects)

        (unset-writable filepath)))
    hash-text))

(defn write-blob
  [text]
  (write-object (str "blob " (count text) "\0" text)))

(defn hash-file
  [filepath]
  (hash-str (slurp filepath)))

;TODO: Use flags from entry hash-map
(defn tree-entry-bytes
  [entry]
  (let [flags-bs (if (= (:type entry) "tree")
                        '(52 48 48 48 48)
                        '(49 48 48 54 52 52))

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

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

(defn branch [b]
  (let [filepath (str (git-root) "refs/heads/" b)]
    (clojure.string/replace (slurp filepath) #"\n" "")))

