DESCRIPTION

Show warning when HEAD is detached after checkout

When checking out a remote tracking branch or a commit, an information
dialog is shown to inform the user about the 'detached HEAD' state. The
dialog can be dismissed with a "Do not show again" check.

Change-Id: I973e53b73dfe14d0d4eec2aef546f322b2ce17f1


COMMENTS

author: Willow Cantrell
date: 2011-03-22 08:40:42.000000000

Patch Set 1: I would prefer that you didn't submit this

(4 inline comments)

See inline comments

Line:180, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java -> I think this is not quite the correct check. It should be something like

if (ObjectId.isId(repository.getFullBranch()) && bop.getResult().....)

instead. This will also make the change in CheckoutCommand obsolete. The point is, we shouldn't rely on the refName parameter to decide whether the head is detached after the operation or not.

For example, right now, with this code, you would get a wrong detached head warning pop-up when trying to checkout a remote branch pointing to the same commit as the currently checked out branch as a consequence of bug 315166.

Line:35, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/CheckoutCommand.java -> Not really needed here (see remark in BranchOperationUI)

Line:761, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> I find the last sentence a bit confusing or just overwhelming. Perhaps we should simply say, "If you want to make changes, create and/or checkout a local branch first".

Line:13, /COMMIT_MSG -> Signed-off missing

-------------------------------------
author: Danika Greer
date: 2011-03-22 10:12:13.000000000

Patch Set 1: (2 inline comments)



Line:180, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java -> I changed the check, thanks for the tip.

Line:761, org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties -> Done

-------------------------------------
