Jay Soffian <jaysoffian@xxxxxxxxx> writes: > On Wed, Oct 5, 2011 at 7:49 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> This reminds me of how we ended up handling the "scary warning" around >> detached HEAD. It is not wrong nor even dangerous to detach. It is not >> wrong nor even dangerous to make commits on detached HEAD. It is however >> dangerous to switch away from that state without saving it to a ref, and >> that is where we give warnings. > > If you have the same branch in two workdirs, then if you commit to > that branch in one workdir, you have to reset --hard in the other. In > that case, wouldn't it make more sense to just use a detached head in > the second workdir? Not at all. My build infrastructure determines where to install the built binary based on what branch is checked out. Having a head detached at a commit that is at the tip of one branch is not necessarily the same as having the branch actually checked out. > Also, if we wait till commit time to tell the user "sorry, topic's > been updated elsewhere", now the user is in a perilous state. Wouldn't the "elsewhere" user would be warned before being able to update the branch? I thought the whole point of your adding "this branch is checked out over there" is exactly so that the "elsewhere" user can come talk to you before that happens. These two people might be yourself, of course. -- 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