emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git push/pull [was: support for bzr shelve/unshelve in vc-dir]


From: Andreas Schwab
Subject: Re: git push/pull [was: support for bzr shelve/unshelve in vc-dir]
Date: Sat, 05 Dec 2009 10:07:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Fabian Ezequiel Gallina <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]