From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Date: Fri, 15 Mar 2024 04:57:08 +0200 Message-ID: References: <8734vici68.fsf@tromey.com> <83y1da17zw.fsf@gnu.org> <87y1dab03x.fsf@tromey.com> <87h6jun400.fsf@gmail.com> <878r3q2jfx.fsf@gmail.com> <877cj6izv7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , 68183@debbugs.gnu.org, Juri Linkov To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec , Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 15 03:57:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rkxlQ-0000mS-BI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Mar 2024 03:57:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkxl9-0001nB-Kn; Thu, 14 Mar 2024 22:57:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkxl8-0001m6-Aj for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 22:57:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkxl8-0000iv-33 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 22:57:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkxli-0005yN-39 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 22:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Mar 2024 02:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68183 X-GNU-PR-Package: emacs Original-Received: via spool by 68183-submit@debbugs.gnu.org id=B68183.171047147922951 (code B ref 68183); Fri, 15 Mar 2024 02:58:02 +0000 Original-Received: (at 68183) by debbugs.gnu.org; 15 Mar 2024 02:57:59 +0000 Original-Received: from localhost ([127.0.0.1]:51046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkxlf-0005y7-5S for submit@debbugs.gnu.org; Thu, 14 Mar 2024 22:57:59 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:36799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkxlb-0005xs-AF for 68183@debbugs.gnu.org; Thu, 14 Mar 2024 22:57:57 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id CDEDF32004CE; Thu, 14 Mar 2024 22:57:12 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 14 Mar 2024 22:57:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710471432; x=1710557832; bh=wTiE72uWqV1F2cfQghzfqC6jismWqvwHwG9/H8k72NQ=; b= b5GDXHWEa+d4h993ppFhOk/kywWfYDL4A9iYRj+XalSNFAV5dOnQSH1KDOIGd1pX XiiNQMsYNaC3PeeuuVUC4Q71ynp+KmKQ+wczuo/XmrfsFg2q/hoC6iBLFxrkQ8dC cNxYzj3lgzztsuYhUV2DgOZbjBP4mW8ZGZ0e01XTq1voB7gsYHu1RAKKyMcS83Di 14UkYfEQrDIvJzCQD/4Yiaead53br7BseLhkw4E2ZlntzXG3DwsYmUSVmZW6vmPR 6LeuDNr+DKgZO0BX8cOxQqLHgQgIVVpzntVMlDPxDekmawG6F4FJXAjIwhZGbvDo r2bt8TQUwCpkiqB1HEW+KA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710471432; x= 1710557832; bh=wTiE72uWqV1F2cfQghzfqC6jismWqvwHwG9/H8k72NQ=; b=o CDrQkDia5s1IgJCUqSjrVYLyzdqXaY7XdkHYFszCUQjd/sHivgmfWF24QeG+O2Lm jWh3vkJYP4FfhFQez/28mtkVm3J70O19La9WjnCV8+PtITBmn+pq/WcQGmPz+ycW 4v+85qFZQSuwz05YRjVyJkzosRShZZZFXe2AXRdD5frKsdX4QL/7fYQn04QS3140 OTcF2Cl8flzW80bTEXwqUtGirXp4ZNDl2LNQQSJwPub2bp2LO+Zl9WFsgnA+q/Y+ r/nS1hfRzGZVHHTvcp9jW0ydCrdf37ZYvf8jLBsUPo24hp0iN8i2kedEpZ4IXBbm OeQ2zBvNkdYVF7LYFXmzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrjeekgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeuteduhfeitdejkeeuffefhefgffevveetjedthfetteegtefhveeujeekjefg veenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Mar 2024 22:57:10 -0400 (EDT) Content-Language: en-US In-Reply-To: <877cj6izv7.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281643 Archived-At: Hi! Sorry about the late reply. It seems like you've done a fair amount of testing, both manual and automated - thanks, more tests are welcome. On 14/02/2024 21:56, Kévin Le Gouguec wrote: > And here's another revision, addressing most of the points below. > WDY'allT? > >> * the test should probably have a (skip-unless (have-git-or-something)), > Done. > >> * maybe "none (tracking local branch)" is not informative and we should >> ditch it, >> * maybe we should fall back to "origin", like vc-git-repository-url >> does, > FWIW, the current patch will show > > Branch : vc-dir-tracking-branch > Tracking : origin/master > Remote :https://git.savannah.gnu.org/git/emacs.git > > for my checkout of this work-in-progress patch, and > > Branch : vc-dir-bug > Tracking : master > Remote : none (tracking local branch) > > for a checkout made following Tom's recipe, and > > Branch : trunk > > for a fresh 'git init' with just a default branch. IIUC you're adding the new "Tracking" header to the output? That seems like it should be helpful. Is there a way that we could/should optimize the display? I.e., I guess the most common case will be something like: Branch : foo-bar Tracking : origin/foo-bar which is not bad, but might be less useful than indicating that the current branch does not track anything (and so the next 'git push' should come with '-u'), or tracks a differently named branch. It might be more ergonomic to emphasize "irregular" scenarios and maybe even save on the extra line in the "common" one. Just a thought. Not something that needs to be addressed right now. And I might as well be off the mark here. > OT1H "none (tracking local branch)" is redundant with "Tracking" not > being prefixed with "origin"; OTOH > > * stripping "Remote" altogether might confuse users - at least "tracking > local branch" hints at what's going on, > > * Falling back to origin's URL might also cause confusion: users might > then expect 'vc-pull' to fetch changes from that URL, which is not the > case. That seems fine. > So all in all I think the above is reasonably useful. > >> * rushed the ChangeLog entry; vc-git-test--run should also be declared >> as a "new helper" (and maybe I should spell out that I used it to not >> have to depend on vc-git-- internal functions), > Done. > >> * maybe the new header deserves a NEWS entry. > Maybe? It wouldn't hurt. Up to you. Anyway, I think the patch is good to go. Please feel free to install it; whatever cosmetic changes we might like to add could be done later.