From: Dmitry Gutov <dmitry@gutov.dev>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tom@tromey.com>,
68183@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
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 [thread overview]
Message-ID: <283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev> (raw)
In-Reply-To: <87zfuyrrfz.fsf@gmail.com>
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.
next prev parent reply other threads:[~2024-03-17 1:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-31 18:59 bug#68183: 28.3; vc-dir fails when I have a certain branch checked out Tom Tromey
2023-12-31 19:34 ` Eli Zaretskii
2023-12-31 20:14 ` Tom Tromey
2024-01-03 9:46 ` Kévin Le Gouguec
2024-02-12 8:08 ` Kévin Le Gouguec
2024-02-14 19:56 ` Kévin Le Gouguec
2024-03-13 20:03 ` Kévin Le Gouguec
2024-03-15 2:57 ` Dmitry Gutov
2024-03-16 17:56 ` Kévin Le Gouguec
2024-03-17 1:06 ` Dmitry Gutov [this message]
2024-03-17 18:09 ` Kévin Le Gouguec
2024-03-18 15:26 ` Dmitry Gutov
2024-08-07 14:25 ` Kévin Le Gouguec
2024-08-08 0:32 ` Sean Whitton
2024-08-08 7:07 ` Kévin Le Gouguec
2024-08-08 12:02 ` Sean Whitton
2024-08-13 1:32 ` Dmitry Gutov
2024-08-20 6:15 ` Kévin Le Gouguec
2024-08-20 12:15 ` Eli Zaretskii
2024-08-22 7:15 ` Kévin Le Gouguec
2024-08-22 12:46 ` Eli Zaretskii
2024-08-29 15:36 ` Kévin Le Gouguec
2024-08-29 15:46 ` Eli Zaretskii
2024-08-29 16:41 ` Kévin Le Gouguec
2024-08-21 0:42 ` Dmitry Gutov
2024-08-21 1:40 ` Sean Whitton
2024-08-21 7:05 ` Kévin Le Gouguec
2024-08-21 7:59 ` Sean Whitton
2024-08-21 12:29 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=283baeb9-d427-45a3-92d5-5e6c095b87ad@gutov.dev \
--to=dmitry@gutov.dev \
--cc=68183@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
--cc=kevin.legouguec@gmail.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.