Ramkumar Ramachandra <artag...@gmail.com> 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?

>> 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?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to