File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/main/clojure/clojure/tools/gitlibs Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 11Changelog
22===========
33
4+ * next
5+ * TDEPS-248 - Make ` tags ` return known tags when offline
46* 2.5.190 on Feb 12, 2023
57 * Don't use future to background the process reading (leaves non-daemon thread)
68* 2.5.186 on Feb 11, 2023
Original file line number Diff line number Diff line change 101101 ^File [url]
102102 (jio/file (:gitlibs/dir @config/CONFIG) " _repos" (clean-url url)))
103103
104+ (defn git-try-fetch
105+ " Try to fetch and return the error code (0=success)"
106+ [^File git-dir]
107+ (let [git-path (.getCanonicalPath git-dir)
108+ ; ; NOTE: --prune-tags would be desirable here but was added in git 2.17.0
109+ {:keys [exit]} (run-git " --git-dir" git-path
110+ " fetch" " --quiet" " --all" " --tags" " --prune" )]
111+ exit))
112+
104113(defn git-fetch
105114 [^File git-dir]
106115 (let [git-path (.getCanonicalPath git-dir)
193202(defn tags
194203 " Fetch, then return all tags in the git dir."
195204 [git-dir]
196- (git-fetch (jio/file git-dir))
205+ (git-try- fetch (jio/file git-dir))
197206 (let [{:keys [exit out err] :as ret} (run-git " --git-dir" git-dir " tag" " --sort=v:refname" )]
198207 (when-not (zero? exit)
199208 (throw (ex-info (format " Unable to get tags %s%n%s" git-dir err) ret)))
You can’t perform that action at this time.
0 commit comments