git.el: Refresh only the changed file marks when marking/unmarking all.
authorAlexandre Julliard <julliard@winehq.org>
Sun, 28 Oct 2007 10:06:27 +0000 (11:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Oct 2007 21:08:28 +0000 (14:08 -0700)
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git.el
index 0e5091c1b7e2e7401e8c23edc16c3c4285b43578..e5ee8ce58b1d8c729d79caa60885a7c4c4cf2355 100644 (file)
@@ -842,7 +842,8 @@ 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)))
 
@@ -850,7 +851,9 @@ Return the list of files that haven't been handled."
   "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)))