On Tue, 3 Apr 2007, Junio C Hamano wrote: > > Could anybody remind me why we have the "new != old" check here? Afaik, it's just so that you can do git checkout -f without having it complain. And I think it just comes from the earlier: [ -z "$new" ] && new=$old && new_name="$old_name" that we did - ie without that it would incorrectly just overwrite the current working tree with the new commit, but not actually do the "git reset" part. So without that check, the way things used to work (*before* detached heads), if you were to have done git checkout <some-random-head> it would have screwed up the current branch horribly. With detached heads, I don't think it's needed. Linus - 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