aboutsummaryrefslogtreecommitdiff
path: root/projectile.el
diff options
context:
space:
mode:
authorDaehyeok Mun <daehyeok@gmail.com>2024-01-20 16:08:17 -0800
committerBozhidar Batsov <bozhidar@batsov.dev>2024-01-21 12:17:13 +0200
commit1df5ccf0cca6ef20084462a7671403b6b858448b (patch)
tree6d99e27f39732ba9fbb1db9630e9616588e97292 /projectile.el
parenteb6b6813a16befe9f06144428b6db2dae15b2f04 (diff)
vcs: add Jujutsu support
Diffstat (limited to 'projectile.el')
-rw-r--r--projectile.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/projectile.el b/projectile.el
index 6bbe6ed..886fdf2 100644
--- a/projectile.el
+++ b/projectile.el
@@ -332,6 +332,7 @@ See `projectile-register-project-type'."
"_darcs" ; Darcs VCS root dir
".pijul" ; Pijul VCS root dir
".sl" ; Sapling VCS root dir
+ ".jj" ; Jujutsu VCS root dir
)
"A list of files considered to mark the root of a project.
The bottommost (parentmost) match has precedence."
@@ -426,7 +427,8 @@ is set to `alien'."
"^\\.ccls-cache$"
"^\\.cache$"
"^\\.clangd$"
- "^\\.sl$")
+ "^\\.sl$"
+ "^\\.jj$")
"A list of directories globally ignored by projectile.
Regular expressions can be used.
@@ -725,6 +727,12 @@ Set to nil to disable listing submodules contents."
:group 'projectile
:type 'string)
+(defcustom projectile-jj-command "jj files --no-pager ."
+ "Command used by projectile to get the files in a Jujutsu project."
+ :group 'projectile
+ :type 'string
+ :package-version '(projectile . "2.9.0"))
+
(defcustom projectile-sapling-command "sl locate -0 -I ."
"Command used by projectile to get the files in a Sapling project."
:group 'projectile
@@ -1469,6 +1477,7 @@ Fallback to a generic command when not in a VCS-controlled project."
('pijul projectile-pijul-command)
('svn projectile-svn-command)
('sapling projectile-sapling-command)
+ ('jj projectile-jj-command)
(_ projectile-generic-command)))
(defun projectile-get-sub-projects-command (vcs)
@@ -3659,6 +3668,7 @@ the variable `projectile-project-root'."
((projectile-file-exists-p (expand-file-name ".pijul" project-root)) 'pijul)
((projectile-file-exists-p (expand-file-name ".svn" project-root)) 'svn)
((projectile-file-exists-p (expand-file-name ".sl" project-root)) 'sapling)
+ ((projectile-file-exists-p (expand-file-name ".jj" project-root)) 'jj)
;; then we check if there's a VCS marker up the directory tree
;; that covers the case when a project is part of a multi-project repository
;; in those cases you can still the VCS to get a list of files for
@@ -3672,6 +3682,7 @@ the variable `projectile-project-root'."
((projectile-locate-dominating-file project-root ".pijul") 'pijul)
((projectile-locate-dominating-file project-root ".svn") 'svn)
((projectile-locate-dominating-file project-root ".sl") 'sapling)
+ ((projectile-locate-dominating-file project-root ".jj") 'jj)
(t 'none)))
(defun projectile--test-name-for-impl-name (impl-file-path)