From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Date: Sat, 16 Mar 2024 18:56:32 +0100 Message-ID: <87zfuyrrfz.fsf@gmail.com> 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 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8623"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Tom Tromey , 68183@debbugs.gnu.org, Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 16 18:58:53 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 1rlYJ0-00020V-9v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 18:58:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlYId-0006Ft-2a; Sat, 16 Mar 2024 13:58: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 1rlYIc-0006Fl-2e for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 13:58: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 1rlYIb-00030X-Qd for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 13:58:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlYJC-0008SN-5y for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 13:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 17:59: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.171061190032452 (code B ref 68183); Sat, 16 Mar 2024 17:59:02 +0000 Original-Received: (at 68183) by debbugs.gnu.org; 16 Mar 2024 17:58:20 +0000 Original-Received: from localhost ([127.0.0.1]:56445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlYIW-0008RM-5W for submit@debbugs.gnu.org; Sat, 16 Mar 2024 13:58:20 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:56669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlYIT-0008R7-RD for 68183@debbugs.gnu.org; Sat, 16 Mar 2024 13:58:18 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33ec7e1d542so1578726f8f.1 for <68183@debbugs.gnu.org>; Sat, 16 Mar 2024 10:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710611795; x=1711216595; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J2j1GzZbHI2JtR7/mFPnWBftfjcTQAgbue5sjCanWHg=; b=Z5ACLjETr1067CSe5662+FxncC8AjkCPaS+T7DF0LBJ2OvMr+kPg6HNWvhtdhHbZj8 +3rNagDTpL5+0amQ+ZRunGUYw1C6LmC6lrUwawUBV3fqtUxJ4h029qZT0YaEiM2SCs9O oZUkGtaDMuy5l7DMBqFym7liqP5LxHZhCnSgyloXh2QgbeuMqLYHTejyAJPqY2ykXwTC o1scKO+j5saZyb6CvTpeKToZfoXcQTEr80J//tc0D5AHDN01HRoUAsyeT7rU4UR1prx/ q2DP5uYh/BnXT8xCbwU9tl29KawjAiIfBJq46cApo3DIWfUEIJj4iQW0MoYDSNsqrxXm Q8jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710611795; x=1711216595; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=J2j1GzZbHI2JtR7/mFPnWBftfjcTQAgbue5sjCanWHg=; b=b0Yp61fhWTiahROLmWixUZnG+bH0nQVIPA0QMFi0wcCftJK5Yroyk9dIDu2ZRSYDbN XKXWQ7y+4D9KR15K5FUxHMizQEY0CZ8VT3H2VxqcqbUwG+FaLYrjVL/71Ug6+mYDwPA/ mnpaZK1r27e5JS7sXqtyFpJnUkjNpivbywmB6aWHP/StqAfSD0h/FSZmRDUhyFRTeXOF /eL5BKfpyt+fA+Yqt/s0xaw6McuWgwSRixV9WrgEMXMeey8k573Wh8Rg26TVKMgNYa4P eXSEAcUPVp/0gMKW7eqjQ7bZt0VLKgeiVR5A70bkXIPXFFPfj3pT95m562XV8lXjop/O aY4g== X-Forwarded-Encrypted: i=1; AJvYcCX7AtUaYFzLJdkkL764fYM3xSZhUOCyTax5gxzVnRNRZ5eemp/q2pfOjhzMWt+indBbYU5wTdvt1ZP+7bxTw9ogu+2lwG8= X-Gm-Message-State: AOJu0YxuPNt3XTaji1C5JdUgZGESSExkHUTS7UpFzjSRVUDmkyF8nqLh Op+VTGGMalsa6qmu0ALP4s+ki1TRETkeFQLlA0ikiAHRL8D4jUA/ X-Google-Smtp-Source: AGHT+IHHLobOhi17pbNCd9LuRak81pZyX1wLO7kSxJEbI8p5aLLE7PKuMUUtnRsjcikLNCRtxVazsQ== X-Received: by 2002:a5d:644a:0:b0:33e:d232:b3e6 with SMTP id d10-20020a5d644a000000b0033ed232b3e6mr3672614wrw.10.1710611794623; Sat, 16 Mar 2024 10:56:34 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id bp2-20020a5d5a82000000b0033e43756d11sm2961112wrb.85.2024.03.16.10.56.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 10:56:34 -0700 (PDT) In-Reply-To: (Dmitry Gutov's message of "Fri, 15 Mar 2024 04:57:08 +0200") 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:281732 Archived-At: Dmitry Gutov writes: > Sorry about the late reply. (Not at all, thanks for taking a look =F0=9F=99=8F) >> 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 li= ke it should be helpful. > > Is there a way that we could/should optimize the display? I.e., I guess t= he 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 curre= nt branch does not track anything (and so the next 'git push' should come w= ith '-u'), or tracks a differently named branch. It might be more ergonomic= to emphasize "irregular" scenarios and maybe even save on the extra line i= n 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) 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) 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). > 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=E2=84=A2 would proba= bly 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). >>> * 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.