 (defn read-git-db
   [gitdir]
   (let [file (git-db-file gitdir)
-        [header & reldata] (-> file
+        [header & [shabam & reldata]] (-> file
                                io/input-stream
                                java.util.zip.GZIPInputStream.
                                (fress/read :handlers sha/read-handlers))]
     (if (= header voomdb-header)
-      (vdb/from-reldata
-       [r-branch r-commit r-commit-parent r-commit-path r-proj]
-       reldata)
+      {:shabam shabam
+       :pldb
+       , (vdb/from-reldata
+          [r-branch r-commit r-commit-parent r-commit-path r-proj]
+          reldata)}
       (do
         (println "Existing voomdb file for" (str gitdir)
                  "has wrong header" header "needed:"
                  voomdb-header)
-        pldb/empty-db))))
+        {:shabam (shabam-new)
+         :pldb pldb/empty-db}))))
 
 (defn write-git-db
   [db gitdir]

  (def xdb3 (vdb/from-reldata [r-tree] (fress/read (fress/write (vdb/to-reldata xdb1)))))
  (pldb/with-db xdb3 (l/run* [a] (r-tree a :b :c :d)))

  (time (def db (add-git-facts pldb/empty-db (io/file voom-repos "lein-voom"))))
  (time (def db (updated-git-db (io/file voom-repos "lein-voom"))))
  (time (def db2 (updated-git-db (io/file voom-repos "lonocore"))))
  )

                                :handlers sha/write-handlers))]
    (fress/begin-open-list w)
    (fress/write-object w voomdb-header)
    (fress/write-object w (:shabam db))
    (doseq [item (vdb/to-reldata (:pldb db))]
      (fress/write-object w item))))

(defn updated-git-db
  [gitdir]
  (let [db (-> (if (.exists (git-db-file gitdir))
                 (read-git-db gitdir)
                 {:shabam (shabam-new) :pldb pldb/empty-db})
               (add-git-facts gitdir))]
    (when (::dirty (meta db))
      (write-git-db db gitdir))
