Skip to content

Commit

Permalink
git.el: Allow the add and remove commands to be applied to ignored fi…
Browse files Browse the repository at this point in the history
…les.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alexandre Julliard authored and Junio C Hamano committed Sep 14, 2007
1 parent 98acc3f commit 568d2cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/emacs/git.el
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ Return the list of files that haven't been handled."
(defun git-add-file ()
"Add marked file(s) to the index cache."
(interactive)
(let ((files (git-get-filenames (git-marked-files-state 'unknown))))
(let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored))))
(unless files
(push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
(apply #'git-run-command nil nil "update-index" "--add" "--" files)
Expand All @@ -920,7 +920,7 @@ Return the list of files that haven't been handled."
(defun git-remove-file ()
"Remove the marked file(s)."
(interactive)
(let ((files (git-get-filenames (git-marked-files-state 'added 'modified 'unknown 'uptodate))))
(let ((files (git-get-filenames (git-marked-files-state 'added 'modified 'unknown 'uptodate 'ignored))))
(unless files
(push (file-relative-name (read-file-name "File to remove: " nil nil t)) files))
(if (yes-or-no-p
Expand Down

0 comments on commit 568d2cd

Please sign in to comment.