Added `magit-list-projects.
This commit is contained in:
parent
1b31c106f8
commit
0ca04f71bb
1 changed files with 12 additions and 0 deletions
12
magit.el
12
magit.el
|
@ -4053,6 +4053,18 @@ With prefix force the removal even it it hasn't been merged."
|
|||
(eq major-mode 'magit-mode)))
|
||||
(buffer-list)))
|
||||
|
||||
(defun magit-list-projects ()
|
||||
"Returns a list of toplevel directories with a magit
|
||||
representation."
|
||||
(remove-duplicates
|
||||
(mapcar (lambda (b)
|
||||
(save-excursion
|
||||
(set-buffer b)
|
||||
(file-name-nondirectory
|
||||
(directory-file-name default-directory))))
|
||||
(magit-list-buffers))
|
||||
:test 'string=))
|
||||
|
||||
(provide 'magit)
|
||||
|
||||
;;; magit.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue