Skip to main content

merge_single_spec

Function merge_single_spec 

Source
pub fn merge_single_spec(
    spec_id: &str,
    spec_branch: &str,
    main_branch: &str,
    should_delete_branch: bool,
    dry_run: bool,
) -> Result<MergeResult>
Expand description

Merge a single spec’s branch into the main branch.

This function:

  1. Saves the current branch
  2. Checks if main branch exists
  3. Checks out main branch
  4. Merges spec branch with fast-forward only
  5. Optionally deletes spec branch if requested
  6. Returns to original branch

In dry-run mode, no actual git commands are executed.