Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311706

Summary: add branch deletion dialog
Product: [Technology] EGit Reporter: Matthias Sohn <matthias.sohn>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: mathias.kinzler
Version: unspecified   
Target Milestone: 0.10.0-M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matthias Sohn CLA 2010-05-05 08:08:23 EDT
We will need a branch deletion dialog to enable setting the options (see [1]):
-d : Delete a branch. The branch must be fully merged in its upstream branch, or in HEAD if no upstream was set with --track or --set-upstream.
-D : Delete a branch irrespective of its merged status. This is implemented with bug 311354
-r : delete (if used with -d) the remote-tracking branches.

[1] http://www.kernel.org/pub/software/scm/git/docs/git-branch.html
Comment 1 Mathias Kinzler CLA 2010-05-06 08:05:57 EDT
(In reply to comment #0)
> We will need a branch deletion dialog to enable setting the options (see [1]):
> -d : Delete a branch. The branch must be fully merged in its upstream branch,
> or in HEAD if no upstream was set with --track or --set-upstream.
> -D : Delete a branch irrespective of its merged status. This is implemented
> with bug 311354
> -r : delete (if used with -d) the remote-tracking branches.
> 
> [1] http://www.kernel.org/pub/software/scm/git/docs/git-branch.html

Is there any way to avoid the dialog for the standard case? I think we should only bring a dialog if necessary, so how about this: if there are no remote-tracking branches for the branch to delete, we try to delete with -d. If this fails, a popup appears saying that deletion of this branch may incur data loss and if they want to delete anyway. If they confirm, we delete with -D.
If there are in fact tracking branches, we will bring a dialog with a checkbox (?) asking if these tracking branches are to be deleted, too. Then we try to delete with -d (and -r depending on the user's choice). If this fails, we bring above confirm dialog and delete with -D if the user confirms.
Comment 2 Mathias Kinzler CLA 2010-10-19 08:27:51 EDT
Code review at http://egit.eclipse.org/r/#change,1769
Comment 3 Mathias Kinzler CLA 2010-10-20 08:45:02 EDT
Merged ast 989bfc4c0f426ce9dfbf7a42cdadeb69616c8c21