git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
AJAlexandre Julliard <julliard@winehq.org>
Date
Oct 28, 2007, 10:06 UTC
Message-ID
<878x5nd04c.fsf@wine.dyndns.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 contrib/emacs/git.el |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 0e5091c..e5ee8ce 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -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)))
 
-- 
1.5.3.4.404.g5a866

-- 
Alexandre Julliard
julliard@winehq.org
Message 1 of 1 in “git.el: Refresh only the changed file marks when marking/unmarking all.”
  1. git.el: Refresh only the changed file marks when marking/unmarking all.Alexandre Julliard, Oct 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.