@matheusbsbs / matheus-bagliano / commits / 2f6e86a86f
Fork 0

git.el: Refresh only the changed file marks when marking/unmarking all.

Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alexandre Julliard committed Oct 28, 2007 at 11:06 UTC 2f6e86a86fb9830c0c3205a317f6205f156cfacc
1 file changed +5 -2
contrib/emacs/git.el
+5 -2
@@ -842,7 +842,8 @@ Return the list of files that haven't been handled."
842 "Mark all files."
843 (interactive)
844 (unless git-status (error "Not in git-status buffer."))
845 - (ewoc-map (lambda (info) (setf (git-fileinfo->marked info) t) t) git-status)
845 + (ewoc-map (lambda (info) (unless (git-fileinfo->marked info)
846 + (setf (git-fileinfo->marked info) t))) git-status)
847 ; move back to goal column after invalidate
848 (when goal-column (move-to-column goal-column)))
849
@@ -850,7 +851,9 @@ Return the list of files that haven't been handled."
851 "Unmark all files."
852 (interactive)
853 (unless git-status (error "Not in git-status buffer."))
853 - (ewoc-map (lambda (info) (setf (git-fileinfo->marked info) nil) t) git-status)
854 + (ewoc-map (lambda (info) (when (git-fileinfo->marked info)
855 + (setf (git-fileinfo->marked info) nil)
856 + t)) git-status)
857 ; move back to goal column after invalidate
858 (when goal-column (move-to-column goal-column)))
859