git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Nordholts <martin@chromecode.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	julliard@winehq.org
Subject: [PATCH] git.el: Make it easy to add unmerged files
Date: Sun, 30 Aug 2009 16:55:48 +0200	[thread overview]
Message-ID: <4A9A92F4.2090209@chromecode.com> (raw)

(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

             reply	other threads:[~2009-08-30 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30 14:55 Martin Nordholts [this message]
2009-08-30 15:58 ` [PATCH] git.el: Make it easy to add unmerged files Alexandre Julliard
2009-09-02  5:48   ` Martin Nordholts
2009-09-02  8:48     ` Alexandre Julliard
  -- strict thread matches above, loose matches on Subject: below --
2009-08-30 14:35 Martin Nordholts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9A92F4.2090209@chromecode.com \
    --to=martin@chromecode.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=julliard@winehq.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).