From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: RFC: Automatic setup for bug-reference-mode Date: Mon, 15 Jun 2020 02:56:34 -0700 Message-ID: <86o8pkabzh.fsf@stephe-leake.org> References: <87r1uihtsu.fsf@gnu.org> <87h7vd3cbs.fsf@gnu.org> <87tuzdsj8d.fsf@gnu.org> <87tuzd755z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="65896"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 15 11:57:36 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 1jkls0-000H0L-0s for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jun 2020 11:57:36 +0200 Original-Received: from localhost ([::1]:41576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jklrz-0006jh-26 for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jun 2020 05:57:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jklr8-0005vo-IT for emacs-devel@gnu.org; Mon, 15 Jun 2020 05:56:42 -0400 Original-Received: from gateway20.websitewelcome.com ([192.185.47.18]:23727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jklr6-0000IP-3Z for emacs-devel@gnu.org; Mon, 15 Jun 2020 05:56:42 -0400 Original-Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 140F5400CC7BB for ; Mon, 15 Jun 2020 03:36:37 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id klr1j4tPPhmVTklr1jxzMQ; Mon, 15 Jun 2020 04:56:35 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IPsQhML8X5kED+hXtA39y/mVBKX+qj0gWF39zyc7A6M=; b=ZCHWPm1eisb+jafHCwvqmkMD8 HOZZDY9ZgEH0Zd1/MA2ojYOK46pcvuSdpeB19Ydb4QFeHbOPDj3k2mS7d5G/inXXLuGPSKMteutnb KKqBL7JYZw+8cNn8tAUTrExSfY5y3xmjcI2WyZ5zWd746JXp96ZkJoS2J9I/KsrR5pOX9LCBY1IkA pO8dVu9cIrJyTWL3kWASgJqjsefHHwhwueINkTInG4GghwwV6NnuY9mMfFlJhZZqoHfRE2w7X/0pw 5UBqK87QTC2kxm7/PgygJrnyGLRYl1diouoKCnj4khpToED4NKZYLggfnT3bXgNYJLdinCoIMmfDI QYZzeYkrw==; Original-Received: from [76.77.182.20] (port=51639 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jklr1-004CmH-AW for emacs-devel@gnu.org; Mon, 15 Jun 2020 03:56:35 -0600 In-Reply-To: <87tuzd755z.fsf@gnu.org> (Tassilo Horn's message of "Sun, 14 Jun 2020 22:39:52 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1jklr1-004CmH-AW X-Source-Sender: (Takver4) [76.77.182.20]:51639 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 4 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: neutral client-ip=192.185.47.18; envelope-from=stephen_leake@stephe-leake.org; helo=gateway20.websitewelcome.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/15 05:56:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779, URIBL_BLOCKED=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:252263 Archived-At: Tassilo Horn writes: > 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). 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. 'git remote -v' lists all remotes; you could just pick the first one. -- -- Stephe