git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git.el: Only show completions from refs/heads, refs/remotes and refs/tags
@ 2009-02-24  8:32 David Kågedal
  2009-02-24  8:39 ` David Kågedal
  0 siblings, 1 reply; 12+ messages in thread
From: David Kågedal @ 2009-02-24  8:32 UTC (permalink / raw)
  To: Alexandre Julliard; +Cc: git, David Kågedal

Otherwise it will pick up e.g. lots of irrelevant stuff from
refs/bisect, refs/stash or refs/patches (for StGit users).

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
---
 contrib/emacs/git.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index feb229c..125e684 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1388,7 +1388,10 @@ With a prefix arg, diff the marked files instead."
 (defun git-read-commit-name (prompt &optional default)
   "Ask for a commit name, with completion for local branch, remote branch and tag."
   (completing-read prompt
-                   (list* "HEAD" "ORIG_HEAD" "FETCH_HEAD" (mapcar #'car (git-for-each-ref)))
+                   (list* "HEAD" "ORIG_HEAD" "FETCH_HEAD"
+                          (mapcar #'car (git-for-each-ref "refs/heads"
+                                                          "refs/remotes"
+                                                          "refs/tags")))
 		   nil nil nil nil default))
 
 (defun git-checkout (branch &optional merge)
-- 
1.6.2.rc1.21.gda6d

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-03-03 14:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24  8:32 [PATCH] git.el: Only show completions from refs/heads, refs/remotes and refs/tags David Kågedal
2009-02-24  8:39 ` David Kågedal
2009-02-24  8:42   ` David Kågedal
2009-02-24 14:50   ` Alexandre Julliard
2009-02-24 15:40     ` David Kågedal
2009-02-24 15:47       ` Alexandre Julliard
2009-02-24 15:57         ` David Kågedal
2009-02-24 16:06           ` Alexandre Julliard
2009-02-24 20:39             ` [PATCH] git.el: Only show completions from refs/heads David Kågedal
2009-03-01 16:56               ` Alexandre Julliard
2009-03-02  7:45                 ` David Kågedal
2009-03-03 14:48                   ` Alexandre Julliard

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).