The _only_ dangerous thing is moving away. Warning at any step is far
more annoying than warning (actually only notifying) only once when the
detached head state is entered.
Let's fix the warning then. But it must stay just because it is
important that the user know _why_ and _when_ the head became detached.
Realizing that head is detached later is far more confusing if the user
just don't know how that happened.
Given that the commit template already says that the head is detached is
IMHO far enough given the actual "dangerousness" of the operation.
And that is already what is happening.
No it is not. The user cannot escape the detached head state (moving
from 3 to 1) without -f or creating a new branch already. Additional
warning between (2) and (3) does nothing but add annoyance to the user
experience.
It is a different state and the user must know why. When doing a commit
it is too late to say "oh btw your head was detached a while ago".
Did I say anything about it being too early?
I say that it is unnecessary and redundent, and that it would create
more confusion than it clears.
It is special because it has an entry point and an exit point, unlike
being on any branch where there is no such notion. So it is important
to know when/how you enters it and how you may leave it. Intermediate
operations don't have to be special with useless warnings.
Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html