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

[PATCH] git.el: Make it easy to add unmerged files

From
MNMartin Nordholts <martin@chromecode.com>
Date
Aug 30, 2009, 14:55 UTC
Message-ID
<4A9A92F4.2090209@chromecode.com>
(Resending as I managed to mangle the previous patch despite trying not to...)

It is nice and easy to git-add ignored and unknown files in a git-status buffer. Make it equally easy to add unmerged files which is a common use case.

Signed-off-by: Martin Nordholts <martinn@src.gnome.org>
---
 contrib/emacs/git.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 8c70ad8..3af5d00 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1046,7 +1046,7 @@ The FILES list must be sorted."
 (defun git-add-file ()
   "Add marked file(s) to the index cache."
   (interactive)
-  (let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored))))
+  (let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored 'unmerged))))
     ;; FIXME: add support for directories
     (unless files
       (push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
-- 
1.6.2.5
Next: Alexandre Julliard
Message 1 of 4 in “git.el: Make it easy to add unmerged files”
  1. git.el: Make it easy to add unmerged filesMartin Nordholts, Aug 30, 2009
  2. Alexandre JulliardAug 30, 2009
  3. Martin NordholtsSep 2, 2009
  4. Alexandre JulliardSep 2, 2009

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.