 
 (defn parse-sha-refs
   [s]
-  (let [[sha datestr refstr] (vec (.split #"," s 3))
+  (let [[sha datestr parents refstr] (vec (.split #"," s 4))
         refs (when refstr
                (when-let [[_ x] (re-find #"\((.*)\)" refstr)]
                  (vec (.split #",\s+" x))))]
-    {:sha sha, :ctime (Date. ^String datestr), :refs refs}))
+    {:sha sha, :ctime (Date. ^String datestr), :parents parents, :refs refs}))
 
 (defn project-change-shas
   [gitdir]
-  (->> (git {:gitdir gitdir} "log" "--all" "--pretty=format:%H,%cd,%d"
+  (->> (git {:gitdir gitdir} "log" "--all" "--pretty=format:%H,%cd,%p,%d"
             "--name-status" "-m" "--" "project.clj" "**/project.clj")
        :lines
        (keep #(if-let [[_ op path] (re-matches #"(.)\t(.*)" %)]

(defn tag-repo-projects
  [gitdir]
  (let [proj-shas (project-change-shas gitdir)]
    (doseq [{:keys [sha refs ops]} (report-progress gitdir proj-shas)
            :when (not-any? #(.startsWith ^String % "tag: voom-") refs)
            {:keys [op path]} ops]
      (when-let [p (and (not= "D" op)
                        (robust-read-project gitdir sha path))]
        (let [tag (s/join "--" ["voom"
                                (str (:group p) "%" (:name p))
                                (:version p)
                                (s/replace (:root p) #"/" "%")
                                (subs sha 0 7)])]
          (git {:gitdir gitdir} "tag" tag sha))))))

(defn clear-voom-tags
  [gitdir]

(defn parse-tag
  [tag]
  (->
   (zipmap [:prefix :proj :ver :path :sha :no-parent] (s/split tag #"--"))
   (update-in [:path] (fnil s/replace "") #"%" "/")
   (update-in [:proj] (fnil s/replace "") #"%" "/")))

