From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: RFC: Automatic setup for bug-reference-mode Date: Sun, 14 Jun 2020 22:03:11 +0100 Message-ID: <877dw9qs1c.fsf@tcd.ie> References: <87r1uihtsu.fsf@gnu.org> <87h7vd3cbs.fsf@gnu.org> <87tuzdsj8d.fsf@gnu.org> <87tuzd755z.fsf@gnu.org> <401bed41-3eb1-3049-2037-a9f2b8ac385c@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="43837"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 14 23:04:05 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jkZnR-000BIg-0i for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jun 2020 23:04:05 +0200 Original-Received: from localhost ([::1]:38760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkZnQ-0002Iu-2n for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jun 2020 17:04:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkZmi-0001on-3f for emacs-devel@gnu.org; Sun, 14 Jun 2020 17:03:20 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkZme-0004tk-O9 for emacs-devel@gnu.org; Sun, 14 Jun 2020 17:03:19 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id h5so15081865wrc.7 for ; Sun, 14 Jun 2020 14:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=J1JYVGpr1WDwYiN07D9/MN/lEpctzunP4WstZKE2u6k=; b=WmhFTyXfnoFnHIqK4meRE26EWquYeIXf5Gevf91/cjPppkiOLgLgiajOJfbukP21Ak A2MQoeQk27OBH1fWm4IBTlHqljXo7cHNuqSEV/qdE+hhKUoCOUUGYkYJL3o84jf0MQxP TUMqMn7cGhRSaVdrdqRFXZvj3p+RJZR/GR3QDvTeuvqBhtUgkcB12wd0RtrS8XifwVmT HOvZECC7QvsKj1vhTGaVnWV4oTHJSJb1nDEee4IDwDWwuAAsc5eXWCmXBQDQ+Of88lYh 3M2PxVJOBd8ZFQF2iwcLQGrlnyt2LVEPyH1y3IysfMf0ZmKTxKRhcyGALg5tagqwIHdT p0mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=J1JYVGpr1WDwYiN07D9/MN/lEpctzunP4WstZKE2u6k=; b=qJpdeuz7ycSU4dD+c/3hUdrhdem6mHEaPFrqNQ3aRHx30ihXd6blhh98a94bgaHC7j Y9FBq9k4zvPrFUMY1+7URQpcTuxaIZSPPpvNresAi3pMV1gS1OkjF4acDmHQE8/4lAI6 pfqpB0uRMXolywcylbnii8rp3Tz6CzELM6/G/FzpsMCN+f8sG6DMhKk3olwktmqf1xnZ wDMhMpQREwyqQ7EJxBD9sTJ07qZipXebrVtmp3PFXe3CM+8f5BqH0AhQu3bFe/LsoiOa yNQA+JIZR3k+X8o056H03cpaZpW5bRYAGZ6yhig1SY4/26/txtfR7CypbQPAPLO79cMD bKRg== X-Gm-Message-State: AOAM530auToPprvHYbgQV/aznj6rJBAwQWVfR017bdQRLPtUvzIGV+LR eYosECwfAr9Do5Tj/yGam8562A== X-Google-Smtp-Source: ABdhPJxTrEwIPlsjF7TswFgVhXZq5MWfSgAcwWfWtamWPCiiaZWihAsdc9fporbvfiM82ypXN7St5w== X-Received: by 2002:a05:6000:1150:: with SMTP id d16mr25181221wrx.197.1592168593578; Sun, 14 Jun 2020 14:03:13 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id q5sm21238270wrm.62.2020.06.14.14.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 14:03:12 -0700 (PDT) In-Reply-To: <401bed41-3eb1-3049-2037-a9f2b8ac385c@yandex.ru> (Dmitry Gutov's message of "Sun, 14 Jun 2020 23:51:21 +0300") Received-SPF: none client-ip=2a00:1450:4864:20::433; envelope-from=contovob@tcd.ie; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252251 Archived-At: Dmitry Gutov writes: > On 14.06.2020 23:39, Tassilo Horn wrote: >> Actually, "git ls-remote --get-url" doesn't work satisfactory which I >> noticed after committing above change on a new local branch. In that >> case, it returned "." so I've changed to this version >> (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). > > Sounds good! > > If the new version can be used in vc-git-dir-extra-headers, could you please > make it so? > > That aside, I was going to ask whether the new backend method should take a > "remote-name" argument, but I don't know how many backends support different > remotes. Or what other actual code is going to use this method anyway. It would definitely be nice to somehow make this configurable. For example in my local Emacs checkout I have Savannah as the "upstream" remote, and my mirror on GitLab as the "origin" remote, because that's where I push to most of the time. I think Forge[1] achieves this by supporting a per-repository git-config variable which tells it which remote to use. [1]: https://github.com/magit/forge Thanks, -- Basil