Re: [PATCH 3/4] push: make non-fast-forward help message configurable
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:22
Jeff King [off-list ref] writes:
Thinking on it more, I think "advice" is the right word. It is not about arbitrary messages; it is about particular messages which try to advise. You would never want this feature to cover messages that are informational about a particular state or action that has occurred. Only "maybe you should try this" messages.
Speaking of which, has anybody felt annoyed by this message?
$ git reset --hard HEAD^^
HEAD is now at 3fb9d58 Do not scramble password read from .cvspass
This is not "maybe you should try this", but I would consider that it
falls into the same "I see you are trying to be helpful, but I know what I
am doing, and you are stealing screen real estate from me without helping
me at all, thank you very much" category.
Besides, if you want to use "where you are" to your next command, you can
just say HEAD without knowing exactly where you are.
It might be slightly more useful if the message said this instead:
$ git reset --hard HEAD^^
HEAD was at d1fe49f push: re-flow non-fast-forward message
Resetting is done because I want to build an alternate history starting
from an earlier point, and when I am done, I may want to feed this to "git
diff" or whatever to sanity check the result, without having to go through
the reflog.