Re: [PATCH 5/6] status: do not depend on flaky reflog messages

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:45

Ramkumar Ramachandra [off-list ref] writes:
In this example, it is inconsequential whether I run:

  $ git checkout v1.8.2^

or:

  $ git checkout v1.8.2
  $ git reset --hard @^

as far as describe is concerned.  It will give me the same good
consistent answer in either case.
Yes, "describe HEAD" is about the location in the history of the
commit at the current HEAD.

But the commit shown on "detached at/detached from" is for people
who care about the differences between the initial "checkout" you
did in these two examples: "checkout v1.8.2^" and "checkout v1.8.2".

That is different from the question you ask to "describe", which is
the location your HEAD happens to be in the commit ancestry graph
after you detached the HEAD with "checkout" and possibly jumping
around.  If you say "Not on any branch" instead of saying "detached
from v1.8.2" (or v1.8.2^), you are losing information, aren't you?

As I said (twice), you can argue that that particular piece of
information is not useful (at least to you), but why it is not
useful has to be justified, against the justification given by
b397ea4863a1 (status: show more info than "currently not on any
branch", 2013-03-13) and people who have been using that information
in the status output, no?
quoted
The user used "checkout" to detach the HEAD, and the user stayed in
that detached state and jumped around.  Where is this "without using
checkout" coming from?
The point I was trying to make is:

  $ git checkout v1.8.2
  $ git checkout @^

will give a different result once again.
The last checkout is for HEAD^ while at v1.8.2 in this case, isn't
it?  Don't you want to show it?

Re: [PATCH 5/6] status: do not depend on flaky reflog messages

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:45

Junio C Hamano wrote:
As I said (twice), you can argue that that particular piece of
information is not useful (at least to you), but why it is not
useful has to be justified, against the justification given by
b397ea4863a1 (status: show more info than "currently not on any
branch", 2013-03-13) and people who have been using that information
in the status output, no?
Yes, Junio.  I cannot justify that "detached HEAD from" is completely
useless, because it is not.  I argued for a practical compromise, and
have tried to show the huge negative impact against the marginal gain.
 If you argue that we absolutely must not cause an
information-regression against all odds and are unwilling to
compromise, I cannot improve the reflog messages written by various
scripts (and fix git checkout -).  I don't know any other way forward.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help