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: Sun, 17 Mar 2024 03:06:36 +0200 Message-ID: <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> 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> <87zfuyrrfz.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="28140"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 17 02:07:59 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 1rlf0I-00074b-60 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Mar 2024 02:07:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlezn-0008NU-6Q; Sat, 16 Mar 2024 21:07: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 1rlezl-0008NK-Md for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 21:07:25 -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 1rlezl-0003Kz-EV for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 21:07:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlf0M-0005jZ-EB for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 21:08: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: Sun, 17 Mar 2024 01:08: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.171063764821998 (code B ref 68183); Sun, 17 Mar 2024 01:08:02 +0000 Original-Received: (at 68183) by debbugs.gnu.org; 17 Mar 2024 01:07:28 +0000 Original-Received: from localhost ([127.0.0.1]:57381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlezo-0005ik-0Z for submit@debbugs.gnu.org; Sat, 16 Mar 2024 21:07:28 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:48109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlezl-0005iY-7J for 68183@debbugs.gnu.org; Sat, 16 Mar 2024 21:07:26 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B97873200392; Sat, 16 Mar 2024 21:06:41 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 16 Mar 2024 21:06:42 -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=1710637601; x=1710724001; bh=p5Isox5NbuavHls5zAbb988LxWyjSkdUNRFcFhOaEfM=; b= EH+yp16i2G9cMkLlDNjSVT442Emi11uy8pYuC0pOg6mWBLYx/gH5aT2pgF+HlENl ms0X5bqhxs9u9WiSIQ0eZ4mzSDLxFa+B62gl2nQm3nct8869pj0Mx1m3e1pqINDm BpgZIo1mlgV6Imh+c2EDLBYIRnS/po9BZ28cU+56QzCKhauQ/n0xCKQvNHgBka3z w3vjHwXpWiLuCmEoC9vvUfwVHgDQjTcMNkbtkonC5UmP/UBGRDciDusQdQUdKwaN 2MwoRi+aJ7P/cd+AkK3LfdAQ6IA4mK9jqyUbRIGPQYURWRX2rxoc4s0VT0K9CfJ+ 9xeHkCF2BQLnE4SZ4JyYhA== 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=1710637601; x= 1710724001; bh=p5Isox5NbuavHls5zAbb988LxWyjSkdUNRFcFhOaEfM=; b=T j0WVkLR6/z0+dEEuUzEkw3HzXIsU7028n7pm/tocUFEbTQ9k6mE66NYJ5idKa6Rf NT/AruU5aKHSGKQh6sO2tkhpjOUaoEGIzf2iz2PTXxVxlHcocs0hVAQdUV2fHuXD uFlDjm9GDpaUw/YrbFAyuyL0o4qd3ZKpwUoXAFCTfucSe2g2e3aX9Vulif1Q76pu O6X0Emynl7olIR8t3kuqbKWqAHRUCQgsQ7L558Vhd1dc3OmRn2x8q4k8dCraYmVv IwhS/WB4/PeRp1bQHTRqTK/2kSHG0lR14tewBbOQDIFCE2cXEcK+3IxiDPI0yc1S ZfaZBVNwPA5AirpLzCixQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeefgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeuteduhfeitdejkeeuffefhefgffevveetjedthfetteegtefhveeujeekjefg veenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Mar 2024 21:06:38 -0400 (EDT) Content-Language: en-US In-Reply-To: <87zfuyrrfz.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:281744 Archived-At: On 16/03/2024 19:56, Kévin Le Gouguec wrote: >> 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 > > Right, the current patch indeed shows this for a common-case clone of > the Emacs repo: > > VC backend : Git > Working dir: ~/src/emacs/master/ > Branch : master > Tracking : origin/master > Remote : https://git.savannah.gnu.org/git/emacs.git > >> 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. > > Good food for thought. > > Re. optimizing the display (which I interpret as reducing redundant > information): as someone who often works with multiple remotes, seeing > "Branch: FOO ; Tracking: origin/FOO" is actually useful, so I wouldn't > want to remove the "tracking" bit unconditionally. OTOH it could surely > be condensed to a single line, say > > Branch : master (tracking: origin/master) Yeah, something like this could work. I was imagining pseudo-graphical Branch : master -> origin/master , but it's good to have words. Maybe drop the last colon... > Likewise, in the local-tracking-branch case, we could go from > > Branch: : vc-dir-bug > Tracking : master > Remote : none (tracking local branch) > > to just > > Branch: : vc-dir-bug (tracking: local master) I would say that the local-tracking scenario is a minority, and so it's not as important to optimize, but the above makes sense. But the word "local" is very close to "master", while the latter is a special string which should probably somehow stand out. So the "unoptimized" version might still have its advantages: Branch: : vc-dir-bug (tracking master) Remote : none (local branch) or Branch: : vc-dir-bug (-> master) Remote : none (local branch) or Branch: : vc-dir-bug (tracking -> master) Remote : none (local branch) > Re. emphasizing irregular scenarios, specifically those where 'git push' > will require '-u': I like the idea, but I am wary of us getting lost in > the weeds second-guessing Git's intentions. E.g. even when > branch.foo.merge and branch.foo.remote are unset, 'git push' can still > be called without '-u' if push.default is 'current' and > remote.pushDefault is set (whereas 'git pull' will fail). Okay, if you're sure. A (no upstream) note might make sense in the above scenario too, but I don't have a strong opinion. We could also make a user option later, if the new behavior makes sense for most usage habits but not all. >> Just a thought. Not something that needs to be addressed right now. And I might as well be off the mark here. > > I agree it's worth thinking about. The Right Solution™ would probably > come with user options to let users fine-tune which details they care > about? It would be interesting to survey Git UIs to see how they > approach this (FWIW I am partial to Magit's presentation, but I have not > studied how it handles all the corner cases we considered). Magit, meaning just one line for Head: and another for Merge:? >>>> * 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. > > ACK. I might go a head and install then (after polishing the changelog, > i.e. re-filling and scrubbing Unicode ellipses) in the spirit of getting > the original issue fixed; perhaps worth holding off on the NEWS entry > until we decide how exactly things should look. I'm okay with that.