From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?David_K=C3=A5gedal?= Subject: Re: [PATCH] git.el: Only show completions from refs/heads, refs/remotes and refs/tags Date: Tue, 24 Feb 2009 09:42:18 +0100 Message-ID: <87d4d8usyd.fsf@krank.kagedal.org> References: <1235464350-23383-1-git-send-email-davidk@lysator.liu.se> <87fxi4ut2p.fsf@krank.kagedal.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org To: Alexandre Julliard X-From: git-owner@vger.kernel.org Tue Feb 24 10:10:02 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LbtIc-0005UH-GG for gcvg-git-2@gmane.org; Tue, 24 Feb 2009 10:09:59 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941AbZBXJIb convert rfc822-to-quoted-printable (ORCPT ); Tue, 24 Feb 2009 04:08:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753711AbZBXJI3 (ORCPT ); Tue, 24 Feb 2009 04:08:29 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]:50256 "EHLO mail.lysator.liu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753429AbZBXJI2 (ORCPT ); Tue, 24 Feb 2009 04:08:28 -0500 X-Greylist: delayed 1723 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 Feb 2009 04:08:28 EST Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 7387D4000E; Tue, 24 Feb 2009 09:42:11 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1674) id 673DF4000F; Tue, 24 Feb 2009 09:42:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL autolearn=disabled version=3.1.7-deb3 Received: from krank (unknown [87.96.142.66]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id 25E974000E; Tue, 24 Feb 2009 09:42:11 +0100 (CET) Received: by krank (Postfix, from userid 1000) id 3B880DC488; Tue, 24 Feb 2009 09:42:18 +0100 (CET) In-Reply-To: <87fxi4ut2p.fsf@krank.kagedal.org> ("David =?utf-8?Q?K=C3=A5g?= =?utf-8?Q?edal=22's?= message of "Tue\, 24 Feb 2009 09\:39\:42 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-Virus-Scanned: ClamAV using ClamSMTP Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: David K=C3=A5gedal writes: > David K=C3=A5gedal writes: > >> 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=C3=A5gedal >> --- >> 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 inst= ead." >> (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" > > Sorry, I didn't check this properly. I thought I was fixing inside th= e > git-checkout function, but this is git-read-commit-name which is used > in more than one place. > > But for git-checkout, I would like to see a much shorter list of name= d > commits, namely those that can be called "branches". =2E.. which means that I would like git-read-commit-name to actually work as its documentation string says it does: "Ask for a commit name, with completion for local branch, remote branch and tag." --=20 David K=C3=A5gedal