8000 Add force-delete option for topic branch deletion · Issue #16 · gittower/git-flow-next · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add force-delete option for topic branch deletion #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alexrinass opened this issue Apr 17, 2025 · 1 comment
Open

Add force-delete option for topic branch deletion #16

alexrinass opened this issue Apr 17, 2025 · 1 comment

Comments

@alexrinass
Copy link
Contributor
alexrinass commented Apr 17, 2025

Add support for force deletion of topic branches, which allows removing branches even if they haven't been fully merged.

  • Add command line options to control force deletion of a topic branch:
    • -f or --force - Force delete the branch
    • --no-force - Explicitly disable force deletion
  • Ensure the git config setting is respected for each topic branch type individually
    • Generic key: gitflow.<topic>.delete.force
    • Examples: gitflow.feature.delete.force, gitflow.release.delete.force, gitflow.hotfix.delete.force
  • When force-deleting, perform the "fully merged" check against the parent branch
    • Example: git branch -d <branch> fails, but git branch -D <branch> or git branch --delete --force <branch> succeeds if branch isn't fully merged
  • Default to non-forced deletion when config setting is not present
  • Update documentation to reflect the new option
  • Add tests to verify the option works correctly for each branch type

Test Cases:

  1. Default Behavior (No Force Delete)

    • Create a branch with non-merged changes
    • Delete without specifying force option
    • Expected: Deletion fails with error about unmerged changes
    • Verify branch still exists with git branch
  2. Force Delete with Command Line (Positive)

    • Create a branch with non-merged changes
    • Test with command line: git flow feature delete myfeature --force
    • Expected: Branch is deleted despite having non-merged changes
    • Verify branch is gone with git branch
  3. Force Delete with Command Line (Negative)

    • Create a branch with non-merged changes
    • Set config: gitflow.feature.delete.force=true
    • Test with command line: git flow feature delete myfeature --no-force
    • Expected: Deletion fails despite config setting
    • Verify branch still exists with git branch
  4. Force Delete with Config

    • Create a branch with non-merged changes
    • Set config: gitflow.feature.delete.force=true
    • Delete without specifying force option
    • Expected: Branch is deleted despite having non-merged changes
    • Verify branch is gone with git branch
  5. Cross-Branch Type Tests

    • Verify force delete works correctly for feature, release, and hotfix branches
    • Test both positive and negative command line options
    • Test with different configs for each branch type
Copy link
linear bot commented Apr 17, 2025
TOWR-32 Implement `force-delete` option for branch deletion

Add support for force deletion of topic branches, which allows removing branches even if they haven't been fully merged.

  • Add command line option to force delete a topic branch (-f or --force)
  • Ensure the git config setting is respected for each topic branch type individually
    • Generic key: gitflow.<topic>.delete.force
    • Examples: gitflow.feature.delete.force, gitflow.release.delete.force, gitflow.hotfix.delete.force
  • When force-deleting, perform the "fully merged" check against the parent branch
    • Example: git branch -d <branch> fails, but git branch -D <branch> or git branch --delete --force <branch> succeeds if branch isn't fully merged
  • Default to non-forced deletion when config setting is not present
  • Update documentation to reflect the new option
  • Add tests to verify the option works correctly for each branch type

@alexrinass alexrinass changed the title Implement force-delete option for branch deletion Implement force-delete option for branch deletion Apr 17, 2025
@alexrinass alexrinass changed the title Implement force-delete option for branch deletion Add force-delete option for topic branch deletion Apr 17, 2025
Sig 4277 n up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0