mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
New function treesit--language-git-version-tags
* lisp/treesit.el (treesit--language-git-version-tags): New function to list version tags for a Tree-sitter parser Git repository (bug#78848).
This commit is contained in:
parent
08fba517f6
commit
22db624c0e
1 changed files with 12 additions and 0 deletions
|
|
@ -5162,6 +5162,18 @@ nil."
|
|||
(string-trim (buffer-string)))
|
||||
(t nil))))
|
||||
|
||||
(defun treesit--language-git-version-tags (repo-dir)
|
||||
"Return a list of Git version tags in REPO-DIR, sorted latest first.
|
||||
|
||||
Return the output of \"git tag --list --sort=-version:refname 'v*'\".
|
||||
If anything goes wrong, return nil."
|
||||
(with-temp-buffer
|
||||
(cond
|
||||
((eq 0 (call-process "git" nil t nil "-C" repo-dir "tag"
|
||||
"--list" "--sort=-version:refname" "v*"))
|
||||
(split-string (buffer-string)))
|
||||
(t nil))))
|
||||
|
||||
(defun treesit--language-git-timestamp (repo-dir)
|
||||
"Return the commit date in REPO-DIR in UNIX epoch.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue