8000 Add back-merge control options for topic branch finish · Issue #22 · gittower/git-flow-next · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add back-merge control options for topic branch finish #22

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 · 2 comments
Open

Add back-merge control options for topic branch finish #22

alexrinass opened this issue Apr 17, 2025 · 2 comments

Comments

@alexrinass
Copy link
Contributor
alexrinass commented Apr 17, 2025

Add support for controlling back-merge behavior when finishing topic branches, allowing users to determine whether changes should be merged back to the development branch.

  • Add the following command line options for back-merge control:
    • --backmerge/--nobackmerge - Enable or prevent automatic back-merge to the development branch
  • Ensure proper configuration hierarchy is respected:
    • Primary configuration comes from generic child base branch setting:
      • gitflow.branch.develop.AutoUpdate - Determines if develop branch should receive back-merges
    • This setting can be overridden by topic-specific config:
      • gitflow.<topic>.finish.nobackmerge
    • Examples: gitflow.release.finish.nobackmerge, gitflow.hotfix.finish.nobackmerge
  • Default behaviors:
    • Use the value of gitflow.branch.develop.AutoUpdate (true by default) to determine back-merge behavior
    • If AutoUpdate is true, perform back-merge unless explicitly disabled
    • If AutoUpdate is false, skip back-merge unless explicitly enabled
  • Add support for both positive and negative forms of the option to allow explicit overrides in either direction
  • Update documentation to reflect the new options and configuration priority
  • Add tests to verify the option works correctly for all applicable branch types

Test Cases for Back-Merge Control Options:

  1. Default Back-Merge Behavior

    • Ensure gitflow.branch.develop.AutoUpdate is not set (default true)
    • Finish a release branch without specifying back-merge option
    • Expected: Changes are merged back to develop branch
    • Verify develop branch contains release changes
  2. Branch Configuration Control

    • Set gitflow.branch.develop.AutoUpdate=false in git config
    • Finish a release branch without specifying back-merge option
    • Expected: No back-merge to develop occurs
    • Verify develop branch does not contain release changes
  3. Override with Command Line (Negative Variant)

    • Set gitflow.branch.develop.AutoUpdate=true in git config
    • Test with command line: git flow release finish myrelease --nobackmerge
    • Expected: No back-merge to develop occurs despite config
    • Verify develop branch does not contain release changes
  4. Override with Command Line (Positive Variant)

    • Set gitflow.branch.develop.AutoUpdate=false in git config
    • Test with command line: git flow release finish myrelease --backmerge
    • Expected: Back-merge to develop occurs despite config
    • Verify develop branch contains release changes
  5. Override Branch Configuration

    • Set gitflow.branch.develop.AutoUpdate=false in git config
    • Set gitflow.release.finish.nobackmerge=false in git config
    • Finish a release branch without command line options
    • Expected: Back-merge occurs due to specific override
    • Verify develop branch contains release changes
  6. Command Line Precedence (Negative)

    • Set conflicting configurations:
      • gitflow.branch.develop.AutoUpdate=true
      • gitflow.release.finish.nobackmerge=false
    • Test with command line: git flow release finish myrelease --nobackmerge
    • Expected: Command line takes precedence, no back-merge occurs
    • Verify develop branch does not contain release changes
  7. Command Line Precedence (Positive)

    • Set conflicting configurations:
      • gitflow.branch.develop.AutoUpdate=false
      • gitflow.release.finish.nobackmerge=true
    • Test with command line: git flow release finish myrelease --backmerge
    • Expected: Command line takes precedence, back-merge occurs
    • Verify develop branch contains release changes
  8. Cross-Branch Type Tests

    • Verify back-merge control works correctly for both release and hotfix branches
    • Test different configurations for each branch type
    • Test both positive and negative command line options
  9. Error Handling

    • Test back-merge with conflicts
    • Expected: Appropriate error and conflict resolution prompts
Copy link
linear bot commented Apr 17, 2025
TOWR-38 Implement back-merge control options for topic finish

Add support for controlling back-merge behavior when finishing topic branches, allowing users to determine whether changes should be merged back to the development branch.

  • Add the following command line option for back-merge control:
    • --nobackmerge - Prevent automatic back-merge to the development branch
  • Ensure proper configuration hierarchy is respected:
    • Primary configuration comes from generic child base branch setting:
      • gitflow.branch.develop.AutoUpdate - Determines if develop branch should receive back-merges
    • This setting can be overridden by topic-specific config:
      • gitflow.<topic>.finish.nobackmerge
    • Examples: gitflow.release.finish.nobackmerge, gitflow.hotfix.finish.nobackmerge
  • Default behaviors:
    • Use the value of gitflow.branch.develop.AutoUpdate (true by default) to determine back-merge behavior
    • If AutoUpdate is true, perform back-merge unless explicitly disabled
    • If AutoUpdate is false, skip back-merge unless explicitly enabled
  • Update documentation to reflect the new option and configuration priority
  • Add tests to verify the option works correctly for all applicable branch types

@alexrinass alexrinass changed the title Implement back-merge control options for topic finish Add back-merge control options for topic branch finish Apr 17, 2025
Sign 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