Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-14441

Delete a branch selecting "force delete" only after the first try

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • Git, UX
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      At the moment, deleting a branch lets you select "force delete" only before trying to delete the branch.

      If you didn't select "force delete" then it will fail with a red message in case it actually required "force delete", error:

      git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks branch -d test/test3
      error: the branch 'test/test3' is not fully merged
      hint: If you are sure you want to delete it, run 'git branch -D test/test3'
      hint: Disable this message with "git config advice.forceDeleteBranch false"Completed with errors, see above.

      This ends up with users having to delete twice after they realize they required to "force delete", and also if they did select "force delete" beforehand, they don't know if that check was really required in the first place if this was their first option.

      To improve the user-experience, please, ask for confirmation to try to "force delete" if and only if the deletion fails in the first try. That way there is no need to show any red error to the user unless the "force delete" also fails.

      The flow should be:
      Delete branch > Show confirmation dialog "Are you sure you want to delete the following branches?" > Yes/No  (remove the "force delete" from this first dialog)
      Then if the user clicks "Yes" and it fails to delete, instead of showing an error, show another modal dialog with:
      "The branch "name-of-branch-here" is not fully merged. Would you like to force delete it?"
      "Yes, force delete branch" / "Cancel"

      Attachments

        Activity

          People

            Unassigned Unassigned
            4027ba81cb1b LazaroCode
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: