"Sohn, Matthias" <matthias.sohn@xxxxxxx> wrote: > Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> wrote on Freitag, 18. September 2009 00:52 > > I think we should do this in the UI by not allowing the user to make a > > choice that would result in a loop and fixing the way the UI resolves > > choices. When creating a new branch we should analyze the selected > > ref and dereference it if it is a symbolic name like HEAD or if it is a > > tag, > > and perhaps show it like "HEAD (refs/heads/master)" in the the dialog. > > > > Using unresolvable refs as the base for a new branch should be > > disallowed. > > If we would do it in the EGit UI how about catching such cases > in other applications using JGit ? I agree with Matthias here, other applications using JGit will also want to be able to detect a ref loop at ref creation time, and also at ref reading time. We should put the test function into JGit and allow the UI to call that test function to determine if creating that symref right now would create a loop. EGit UI can then use that function to qualify the user's selection, and prevent the user from making a choice which would create a loop. -- Shawn. -- 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