Skip to content

Commit

Permalink
fix: use repo dir instead of workdir as default-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyinz committed Sep 20, 2023
1 parent 487ab57 commit b2d40d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-cliff.el
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ DIR. If REGEXP is non-nil, match configurations by REGEXP instead of
(transient-define-suffix git-cliff--edit-config ()
(interactive)
(if-let* ((path (git-cliff--get-infix "--config="))
(default-directory (git-cliff--get-infix "--workdir="))
(default-directory (git-cliff--get-infix "--repository="))
((file-exists-p path)))
(find-file path)
(message "git-cliff: %s not exist!" path)))

(transient-define-suffix git-cliff--open-changelog ()
(interactive)
(if-let* ((default-directory (git-cliff--get-infix "--workdir="))
(if-let* ((default-directory (git-cliff--get-infix "--repository="))
(name "CHANGELOG.md")
((file-exists-p name)))
(find-file-read-only name)
Expand Down

0 comments on commit b2d40d9

Please sign in to comment.