浏览代码

Add remove

master
10sr 5 年前
父节点
当前提交
b31dd6e404
签署人:: 10sr GPG 密钥 ID: 7BEC428194130EB2
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. +15
    -0
      emacs.el

+ 15
- 0
emacs.el 查看文件

@@ -2203,6 +2203,21 @@ initializing."
(apply 'git-worktree--call-process args))
(revert-buffer)))

(defun git-worktree-mode-remove ()
"Remove worktree at point."
(interactive)
(let* ((id (tabulated-list-get-id))
(path (plist-get id :worktree)))
(cl-assert path nil "No worktree info at point")
(cl-assert (file-directory-p path) t "Directory not found")
(when (yes-or-no-p (format "Remove workking directory \"%s\": "
path))
(with-temp-buffer
(git-worktree--call-process "worktree"
"remove"
path))
(revert-buffer))))

(defvar git-worktree-mode-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)


正在加载...
取消
保存