Nanako Shiraishi <nanako3@xxxxxxxxxxx> writes: > Quoting Junio C Hamano <gitster@xxxxxxxxx>: > >> Sitaram Chamarty <sitaramc@xxxxxxxxx> writes: >> >>> At the command line, this gives you a detailed warning message, but the >>> GUI currently allows it without any fuss. >>> >>> Since the GUI is often used by people much less familiar with git, it >>> seems reasonable to make the GUI more restrictive than the command line, >>> not less. >>> ... >>> This patch helps me a lot. >> >> The patch seems to disable checkout unconditionally, but it at least needs >> an "expert mode" switch to bypass the patch's logic, or (better yet) a >> "training wheel" switch for you to set in repositories of the people you >> manage. > > It will be more helpful if it checked out a new local branch that tracks > the remote branch, instead of refusing what the user asked to do. It may > need a new dialog that asks to confirm (and allows the user to change) > the name of the new branch. Heh, stop, step back and think a bit. I admit that it wasn't just you; we were both blind. If we unconditionally disable "check out this branch" from the context sensitive menu for the tip of a remote tracking branch, I do not think we lose anything. If one wants to start a new local branch from there, one can use the context sensitive menu for an arbitrary commit (rowmenu) and say "Create new branch". If we wanted users of gitk to use it to detach HEAD, the current UI is not a good way to do so anyway --- it only allows detaching the tip of remote tracking branches and not an arbitrary commit. Side note. I am not arguing it is a good idea. I am only saying that if it were a good idea, such an action should be in rowmenu that applies to any commit, not headmenu that applies only to the tips of refs. So I retract my earlier objection entirely. I do not think the feature Sitaram is disabling was meant to allow detaching HEAD at all and it can be safely disabled for remote tracking branches to make the GUI experience safer. -- 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