 (s/def ::sha-1-prefix
   (s/and
     string?
-    #(<= (count %) SHA-1-HEX-LENGTH)))
+    #(<= (count %) SHA-1-HEX-LENGTH)
+    #(> (count %) 0)
+))
 
 (defn decompress-zlib [data]
   (let [buffer (byte-array (alength data))

                         (.getName %)) are-files)]
    (filter is-valid-hash-str names)))

(defn complete-hash [hash-prefix]
  (s/assert ::sha-1-prefix hash-prefix)
  (let [len (count hash-prefix)
        all (all-objects)
        ps (map #(subs % 0 len) all)

      (throw (Exception. 
               (str "Ambiguous object prefix '" hash-prefix "'")))
      :else (second (first matches)))))

(stest/instrument `complete-hash)

(defn read-object [hash-prefix]
  (let [hash-hex (complete-hash hash-prefix)
