Skip to content

Commit 25fb2cf

Browse files
committed
tags should fetch to ensure all tags are found
1 parent 947363e commit 25fb2cf

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Changelog
22
===========
33

4+
* next
5+
* `tags` api should fetch to ensure all tags are returned
46
* 2.2.152 on Apr 3, 2021
57
* Fix issue with fetching new commits on branches
68
* 2.1.144 on Mar 12, 2021

src/main/clojure/clojure/tools/gitlibs.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
(->> shas (sort (partial impl/commit-comparator git-dir)) first))))))
7575

7676
(defn tags
77-
"Returns coll of tags in git url"
77+
"Fetches, then returns coll of tags in git url"
7878
[url]
7979
(impl/tags (impl/ensure-git-dir url)))
8080

src/main/clojure/clojure/tools/gitlibs/impl.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@
141141
(throw (IOException. (str "Prefix not unique: " prefix))))))))
142142

143143
(defn tags
144+
"Fetch, then return all tags in the git dir. "
144145
[git-dir]
146+
(git-fetch (jio/file git-dir))
145147
(let [{:keys [exit out err] :as ret} (run-git "--git-dir" git-dir "tag")]
146148
(when-not (zero? exit)
147149
(throw (ex-info (format "Unable to get tags %s%n%s" git-dir err) ret)))

0 commit comments

Comments
 (0)