Skip to content

Commit 1fd37b7

Browse files
authored
Sort tags in version order
1 parent 11eca7f commit 1fd37b7

File tree

1 file changed

+2
-2
lines changed
  • src/main/clojure/clojure/tools/gitlibs

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@
174174
(throw (IOException. (str "Prefix not unique: " prefix))))))))
175175

176176
(defn tags
177-
"Fetch, then return all tags in the git dir. "
177+
"Fetch, then return all tags in the git dir."
178178
[git-dir]
179179
(git-fetch (jio/file git-dir))
180-
(let [{:keys [exit out err] :as ret} (run-git "--git-dir" git-dir "tag")]
180+
(let [{:keys [exit out err] :as ret} (run-git "--git-dir" git-dir "tag" "--sort=v:refname")]
181181
(when-not (zero? exit)
182182
(throw (ex-info (format "Unable to get tags %s%n%s" git-dir err) ret)))
183183
(remove str/blank? (str/split-lines out))))

0 commit comments

Comments
 (0)