Skip to main content

is_branch_merged

Function is_branch_merged 

Source
pub fn is_branch_merged(branch_name: &str, target_branch: &str) -> Result<bool>
Expand description

Check if a branch has been merged into a target branch.

§Arguments

  • branch_name - The branch to check
  • target_branch - The target branch to check against (e.g., “main”)

§Returns

  • Ok(true) if the branch has been merged into the target
  • Ok(false) if the branch exists but hasn’t been merged
  • Err(_) if git operations fail