    [:h4 "Pushed by"]
    (user-link (:user jar)) " on "
    [:span {:title (str (:created jar))} (simple-date (:created jar))]
-   (when-let [url (vcs-host-tree-url jar)]
-     [:span.commit-url " with " (link-to url "this git tree")])))
+   (when-some [link (vcs-host-tree-link jar "this git tree")]
+     [:span.commit-url " with " link])))
 
 (defn versions [jar recent-versions count]
   (list

     ["/images/git-mark.png" "VCS"])))

(defn- vcs-host-link [jar]
  (if-let [{:keys [repo-url type user repo-name]} (vcs-host-info jar)]
    (link-to repo-url
             (vcs-logo type)
             (format "%s/%s" user repo-name))
    [:p (vcs-logo :unknown) "N/A"]))

(defn cljdoc-uri
  "Returns the URI that this JAR would have on cljdoc.org. Doesn't validate that

    (when (and repo-url tag)
      (str repo-url "/tree/" tag))))

(defn- vcs-host-tree-link [jar link-text]
  (try
   (when-some [url (vcs-host-tree-url jar)]
     (link-to url link-text))
   (catch Exception _
     nil)))

(defn dependency-link [db dep]
  (link-to
   (if (jar-exists db (:group_name dep) (:jar_name dep)) (jar-url dep) (maven-jar-url dep))
