Skip to content

Commit

Permalink
refactor: simplify function git-cliff--status
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyinz committed Mar 4, 2024
1 parent 95b2983 commit be4b22a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions git-cliff.el
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,14 @@ This command will commit all staged files by default."
(abbreviate-file-name (file-name-directory file))))
(cmd (and-let* ((path (git-cliff--executable-path)))
(abbreviate-file-name path))))
(format "binary path : %s\n current dir : %s\n bumped tags : %s\n"
(propertize (or cmd "Not found") 'face 'link-visited)
(propertize (or dir "Not dir") 'face 'link-visited)
(propertize (concat (git-cliff--tag-latest)
(and-let* ((new (git-cliff--bumped-version)))
(concat " => " new)))
'face 'link-visited))))
(apply #'format
"binary path : %s\n current dir : %s\n bumped tags : %s\n"
(mapcar (lambda (s) (propertize s 'face 'success))
(list (or cmd "Not found")
(or dir "Not dir")
(concat (git-cliff--tag-latest)
(and-let* ((new (git-cliff--bumped-version)))
(concat " => " new))))))))

;;;###autoload (autoload 'git-cliff-menu "git-cliff" nil t)
(transient-define-prefix git-cliff-menu ()

Check failure on line 380 in git-cliff.el

View workflow job for this annotation

GitHub Actions / build (29.1, true)

Need command, got ‘:info’
Expand Down

0 comments on commit be4b22a

Please sign in to comment.