Skip to content

Commit

Permalink
git.el: Refresh only the changed file marks when marking/unmarking all.
Browse files Browse the repository at this point in the history
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 Oct 28, 2007
1 parent 6df0238 commit 2f6e86a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contrib/emacs/git.el
Original file line number Diff line number Diff line change
Expand Up @@ -842,15 +842,18 @@ Return the list of files that haven't been handled."
"Mark all files."
(interactive)
(unless git-status (error "Not in git-status buffer."))
(ewoc-map (lambda (info) (setf (git-fileinfo->marked info) t) t) git-status)
(ewoc-map (lambda (info) (unless (git-fileinfo->marked info)
(setf (git-fileinfo->marked info) t))) git-status)
; move back to goal column after invalidate
(when goal-column (move-to-column goal-column)))

(defun git-unmark-all ()
"Unmark all files."
(interactive)
(unless git-status (error "Not in git-status buffer."))
(ewoc-map (lambda (info) (setf (git-fileinfo->marked info) nil) t) git-status)
(ewoc-map (lambda (info) (when (git-fileinfo->marked info)
(setf (git-fileinfo->marked info) nil)
t)) git-status)
; move back to goal column after invalidate
(when goal-column (move-to-column goal-column)))

Expand Down

0 comments on commit 2f6e86a

Please sign in to comment.