Merge commit 'voins/clean'

This commit is contained in:
Marius Vollmer 2009-02-15 01:47:44 +02:00
commit 62d9f73aea

View file

@ -1024,6 +1024,7 @@ Many Magit faces inherit from this one by default."
(define-key map (kbd "x") 'magit-reset-head)
(define-key map (kbd "X") 'magit-reset-working-tree)
(define-key map (kbd "k") 'magit-discard-item)
(define-key map (kbd "K") 'magit-clean)
(define-key map (kbd "RET") 'magit-visit-item)
(define-key map (kbd "SPC") 'magit-show-item-or-scroll-up)
(define-key map (kbd "DEL") 'magit-show-item-or-scroll-down)
@ -2670,4 +2671,10 @@ Prefix arg means justify as well."
(erase-buffer)
(shell-command (concat magit-git-executable " branch -va") t t)))
(defun magit-clean ()
(interactive)
(if (yes-or-no-p "Remove all untracked files and directories? ")
(magit-run "git" "clean" "-dxf")))
(provide 'magit)