@Junio - to put the issue in the context of your previous comments on
the topic... way back when you made a comment about warnings during
commits to detached heads..


> If we _really_ don't want newbies to shoot themselves in the foot, we
> probably can issue a loud warning when they detach there HEAD.
> Oh, wait,... we already do that.

The reason this rationale doesn't ring true for me, is that it is
*very* common for me to checkout a detached-head and there is nothing
odd or dangerous about it. I do this when using checkout to move
around the history to inspect, build, and test different revisions. As
a result, it's very easy to just start ignoring this (usually
meaningless) message.

The dangerous situation only occurs when something is committed onto a
detached-head, and at this point there is no warning. The "# Not
currently on any branch" message that appears during "git status"
easily blends in with boilerplate text there.

IMO, the current warning during checkout of a detached-head is
misplaced. It should be removed, and instead there should only be a
warning after detached-head commit, since this is the only time there
is a danger of losing something.

With my proposed "ephemeral branch" concept, there is no warning
necessary in either case, since any check-ins left dangling would get
names in the branch space you could see and take a look at. If that
dangling head was temporary and was named or rebased, the ephemeral
branch name would disappear automatically, leaving the expert-user
with no warnings and no annoyance, while the novice user with a simple
tool to help them not lose track of changes they made.
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