[Top][All Lists]

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

Re: RFC: Automatic setup for bug-reference-mode

From: Tassilo Horn
Subject: Re: RFC: Automatic setup for bug-reference-mode
Date: Thu, 18 Jun 2020 15:37:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 18.06.2020 09:06, Tassilo Horn wrote:
>> I think the actual problem was that
>>    git config branch.<branch>.remote
>> wasn't necessarily called in the given project DIR so returned the
>> global default remote "origin".
> I... don't think so?
> It returned an empty string in my testing. Which resulted in
> remote-url being nil.

I've tested and written my fix with a version before your change (and
wrongly using M-: (vc-git-dir-extra-headers "repo/no/origin/remote")).
And there I got the remote "origin" (which doesn't exist in that repo).
Oh, I think that's because I did the M-: while being in vc-git.el, so it
looked at the emacs repo, not the one in the DIR argument!

Well, if you got the remote "", I still think that default-directory was
set to some non-git repo directory at that time.  At least

  ❯ git config branch.master.remote

returns successfully but empty in such a directory.

It's not exactly clear to me when vc-dir sets default-directory.  So if
you want to find out, you could checkout an emacs version before our
changes and invoke vc-dir from somewhere where default-directory is not
in some git repo.  I think you'd get that error no matter if the DIR of
vc-dir has a remote origin or not.


reply via email to

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