From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: git push/pull [was: support for bzr shelve/unshelve in vc-dir] Date: Sat, 05 Dec 2009 10:07:12 +0100 Message-ID: References: <9de1a5ef0912050009i59707986gb177505e04975e1b@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260004063 23404 80.91.229.12 (5 Dec 2009 09:07:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Dec 2009 09:07:43 +0000 (UTC) Cc: Emacs-Devel devel To: Fabian Ezequiel Gallina Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 05 10:07:36 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGqc1-0007QU-Ki for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 10:07:33 +0100 Original-Received: from localhost ([127.0.0.1]:44502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGqc1-00059R-23 for ged-emacs-devel@m.gmane.org; Sat, 05 Dec 2009 04:07:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGqbv-00059E-4c for emacs-devel@gnu.org; Sat, 05 Dec 2009 04:07:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGqbq-000573-Hs for emacs-devel@gnu.org; Sat, 05 Dec 2009 04:07:26 -0500 Original-Received: from [199.232.76.173] (port=33946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGqbq-00056u-BM for emacs-devel@gnu.org; Sat, 05 Dec 2009 04:07:22 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:49868) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGqbp-0005Os-S7 for emacs-devel@gnu.org; Sat, 05 Dec 2009 04:07:22 -0500 Original-Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 29A901C00044; Sat, 5 Dec 2009 10:07:14 +0100 (CET) Original-Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id 24EEA90400; Sat, 5 Dec 2009 10:07:14 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id UAiAo2oudGA3; Sat, 5 Dec 2009 10:07:12 +0100 (CET) Original-Received: from igel.home (DSL01.83.171.177.205.ip-pool.NEFkom.net [83.171.177.205]) by mail.mnet-online.de (Postfix) with ESMTP; Sat, 5 Dec 2009 10:07:12 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 501) id 7FEE2CA28C; Sat, 5 Dec 2009 10:07:12 +0100 (CET) X-Yow: Go on, EMOTE! I was RAISED on thought balloons!! In-Reply-To: <9de1a5ef0912050009i59707986gb177505e04975e1b@mail.gmail.com> (Fabian Ezequiel Gallina's message of "Sat, 5 Dec 2009 05:09:39 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118296 Archived-At: Fabian Ezequiel Gallina writes: > (setq available-repos > (let ((table (list "."))) > (with-temp-buffer > (vc-git-command t nil nil "for-each-ref" "--format=%(refname)") > (goto-char (point-min)) > (while (re-search-forward "^refs/remotes/\\([^/]+\\).*$" nil t) > (push (match-string 1) table))) A remote's name can contain / itself, and this would also miss remotes that where never fetched from. You can use git config to list the defined remotes, see __git_remotes in /etc/bash_completion.d/git.sh. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."