[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: Automatic setup for bug-reference-mode
From: |
Juri Linkov |
Subject: |
Re: RFC: Automatic setup for bug-reference-mode |
Date: |
Thu, 18 Jun 2020 00:35:51 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>> (defun vc-git-repository-url (file-or-dir)
>>> (let ((default-directory (vc-git-root file-or-dir)))
>>> (with-temp-buffer
>>> (vc-git-command (current-buffer) 0 nil "remote" "get-url" "origin")
>>> (buffer-substring-no-properties (point-min) (1- (point-max))))))
>>>
>>> where I explicitly name the remote "origin" (which, I know, doesn't need
>>> to exist but still works in 99% of all cases).
>>
>> I'm in the 1%; I have git repositories that don't have 'origin'; they
>> have 'savannah'. I migrated from monotone, where the remotes have real
>> names.
>>
>> So some method of overriding 'origin' would be appreciated.
>
> It already has on master, i.e., you can pass in an optional remote-name.
Typing 'C-x v d' (vc-dir) on a repository without 'origin'
raises the error "Failed (status 128): git --no-pager remote get-url ."
- Re: RFC: Automatic setup for bug-reference-mode, (continued)
- Re: RFC: Automatic setup for bug-reference-mode, Dmitry Gutov, 2020/06/14
- Re: RFC: Automatic setup for bug-reference-mode, Tassilo Horn, 2020/06/14
- Re: RFC: Automatic setup for bug-reference-mode, Dmitry Gutov, 2020/06/14
- Re: RFC: Automatic setup for bug-reference-mode, Basil L. Contovounesios, 2020/06/14
- VC repository-url command (was: RFC: Automatic setup for bug-reference-mode), Tassilo Horn, 2020/06/15
- Re: VC repository-url command, Basil L. Contovounesios, 2020/06/15
- Re: RFC: Automatic setup for bug-reference-mode, Stephen Leake, 2020/06/15
- Re: RFC: Automatic setup for bug-reference-mode, Tassilo Horn, 2020/06/15
- Re: RFC: Automatic setup for bug-reference-mode,
Juri Linkov <=
- Re: RFC: Automatic setup for bug-reference-mode, Dmitry Gutov, 2020/06/17
- Re: RFC: Automatic setup for bug-reference-mode, Tassilo Horn, 2020/06/18
- Re: RFC: Automatic setup for bug-reference-mode, Dmitry Gutov, 2020/06/18
- Re: RFC: Automatic setup for bug-reference-mode, Tassilo Horn, 2020/06/18
- Re: RFC: Automatic setup for bug-reference-mode, Dmitry Gutov, 2020/06/18
- Re: RFC: Automatic setup for bug-reference-mode, Tassilo Horn, 2020/06/15