From: Tassilo Horn <tsdh@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel <emacs-devel@gnu.org>,
Stephen Leake <stephen_leake@stephe-leake.org>,
Juri Linkov <juri@linkov.net>
Subject: Re: RFC: Automatic setup for bug-reference-mode
Date: Thu, 18 Jun 2020 15:37:59 +0200 [thread overview]
Message-ID: <87r1ucwl3c.fsf@gnu.org> (raw)
In-Reply-To: <59a15059-2ba5-5fcb-c6aa-3c9877394e1d@yandex.ru> (Dmitry Gutov's message of "Thu, 18 Jun 2020 12:46:40 +0300")
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.
Bye,
Tassilo
next prev parent reply other threads:[~2020-06-18 13:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 9:37 RFC: Automatic setup for bug-reference-mode Tassilo Horn
2020-06-14 12:13 ` Basil L. Contovounesios
2020-06-14 12:56 ` Tassilo Horn
2020-06-14 14:56 ` Basil L. Contovounesios
2020-06-14 14:22 ` Stefan Monnier
2020-06-14 15:18 ` Tassilo Horn
2020-06-14 16:30 ` Tassilo Horn
2020-06-14 18:08 ` Basil L. Contovounesios
2020-06-14 18:40 ` Stefan Monnier
2020-06-14 18:57 ` Basil L. Contovounesios
2020-06-14 19:43 ` Tassilo Horn
2020-06-14 19:41 ` Dmitry Gutov
2020-06-14 20:39 ` Tassilo Horn
2020-06-14 20:51 ` Dmitry Gutov
2020-06-14 21:03 ` Basil L. Contovounesios
2020-06-15 6:23 ` VC repository-url command (was: RFC: Automatic setup for bug-reference-mode) Tassilo Horn
2020-06-15 11:33 ` VC repository-url command Basil L. Contovounesios
2020-06-15 9:56 ` RFC: Automatic setup for bug-reference-mode Stephen Leake
2020-06-15 10:21 ` Tassilo Horn
2020-06-17 21:35 ` Juri Linkov
2020-06-17 22:10 ` Dmitry Gutov
2020-06-18 6:06 ` Tassilo Horn
2020-06-18 9:46 ` Dmitry Gutov
2020-06-18 13:37 ` Tassilo Horn [this message]
2020-06-18 14:28 ` Dmitry Gutov
2020-06-15 10:57 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1ucwl3c.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
--cc=stephen_leake@stephe-leake.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.