Re: Difficulties in advertising a new branch to git newbies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Jan 2007, Jeff King wrote:

> I just think it is awkward to have to either see such a warning
> (or use -f) just to _look_ at detached commits, when you aren't doing
> anything even remotely dangerous. The dangerous thing is _creating_
> commits on top of a detached head.  I honestly don't think it should be
> allowed at all, but since some people have argued that it is useful,
> that seems like the place to put warnings. Anything else is just making
> things more confusing for the sorts of people Carl is dealing with --
> those who merely want to look around.

I disagree again.  Making commits on a detached head is not dangerous.

What is dangerous is moving away from the tip of that detached head 
without attaching it somewhere.  And that case is well covered already.

Also the warning when moving to a detached head is useful to make the 
user aware of what just happened because there is really something 
special about such checkout.  It is not meant to frighten users and if 
it does so then maybe it should be reworked some more.  But IMHO it is 
important that the user be aware of this special state.

But making a warning at commit time is wrong. It is completely 
disconnected from the actual issue and I think it'd create more 
confusion because there is in fact nothing to worry about at the moment 
the commit is made.  The very fact that you think yourself that a 
warning should be displayed at commit time indicates to me that you 
might be a bit confused yourself and such warning if present at commit 
time wouldn't help clearing that confusion at all.

> > For situations like Carl's intstruction where a user, who is
> > purely a sightseer, uses the detached HEAD to go-and-look a
> > particular state, the fact that "-f" loses the previous local
> 
> Yes, though it would be nicer not to have to explain to them why '-f' is
> needed.

In Carl's case suggesting -f is probably not a good idea.  Using -f _is_ 
dangerous and we better not get people into the habit of using -f 
without thinking.

Let's focus on the real issue: the warning message when head gets 
detached.  This message is not meant to frighten users.  It is meant to 
make the user aware of a special state (pretty useful but special 
nevertheless) and give a suggestion about what to do if that state was 
entered by mistake.  So if that message scares users away then it is the 
message itself which is buggy not its presence.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]