Re: `git status` output is very misleading after a merge on a "detached HEAD"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 12, 2017 at 7:43 AM, Michael J Gruber <git@xxxxxxxxx> wrote:
> Am 11. April 2017 22:40:14 MESZ schrieb "Ævar Arnfjörð Bjarmason" <avarab@xxxxxxxxx>:
>>On Tue, Apr 11, 2017 at 5:13 PM, Enis Bayramoğlu
>>> HEAD detached from origin/master 1 commit ago,
>>
>>In lieu of that, which would need some of the rev-list machinery to be
>>invoked on every git-status, I wonder if just saying "HEAD detached &
>>diverged from origin/master" wouldn't be clearer:
>>
>>diff --git a/wt-status.c b/wt-status.c
>>index 308cf3779e..79c8cfd1cf 100644
>>--- a/wt-status.c
>>+++ b/wt-status.c
>>@@ -1542,7 +1542,7 @@ static void wt_longstatus_print(struct wt_status
>>*s)
>>                                if (state.detached_at)
>>                                      on_what = _("HEAD detached at ");
>>                                else
>>-                                       on_what = _("HEAD detached from
>>");
>>+                                       on_what = _("HEAD detached &
>>diverged from ");
>>                        } else {
>>                                branch_name = "";
>>                           on_what = _("Not currently on any branch.");
>>
>>
>>
>
> No way. That would reduce the information that we give.

How does it reduce the information we give? Maybe I've missed
something about what "from" means here, as opposed to "at", but it
seems to me to mean the same thing as "diverged" by definition, i.e.
we detached from the branch but we diverged from it. Saying "diverged"
just makes it clearer, how does it reduce the information we give?

> Note that the difference between from and at is also: are there commits that we could lose when we switch away, that is: that git checkout would warn us about?

Right, but I don't see how that's in any way conflicting or mutually
exclusive with saying before hand that we've diverged from the branch.

> Maybe improve the doc instead?

Aside from whether my patch makes any sense, the solution to a UX
issue really can't be "oh this just needs to be documented". For every
user who's confused by some interface we provide a *tiny* minority of
them go and exhaustively read the docs for an explanation, will just
remain confused.

I think saying from v.s. at is way too subtle, I for one have been
missing it for years until this thread, that's bad UX, git's also used
by a lot of non-native English speakers who may not at all get the
subtle difference between at and from in this context, or if they do
think the UI is using that subtlety to tell them something.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]