Fix edge case in magit forge remote prompt
Sometimes (doom-project-root) can return nil
This commit is contained in:
parent
eb41f1b872
commit
c8109d0518
|
@ -3729,9 +3729,11 @@ the pre-filled remote url use ssh.
|
||||||
:filter-args #'magit-remote-add
|
:filter-args #'magit-remote-add
|
||||||
(interactive
|
(interactive
|
||||||
(let ((default-name
|
(let ((default-name
|
||||||
(subst-char-in-string ?\s ?-
|
(subst-char-in-string
|
||||||
(file-name-nondirectory
|
?\s ?-
|
||||||
(directory-file-name (doom-project-root))))))
|
(file-name-nondirectory
|
||||||
|
(directory-file-name
|
||||||
|
(or (doom-project-root) default-directory))))))
|
||||||
(or (and +magit-default-forge-remote
|
(or (and +magit-default-forge-remote
|
||||||
(not (magit-list-remotes))
|
(not (magit-list-remotes))
|
||||||
(eq (read-char-choice
|
(eq (read-char-choice
|
||||||
|
|
Loading…
Reference in New Issue