#!/bin/bash

# shellcheck shell=bash

# Delete branch only
bridge_delete_branch_only() {
  if [[ -z "${1:-}" ]]; then
    json_error "Branch name required"
    return 1
  fi
  branch_name="$1"
  
  if git_require_repo_root >/dev/null 2>&1; then
    if git_branch_exists "$branch_name"; then
      git_delete_branch "$branch_name"
      echo "true"
    else
      json_error "Branch not found: $branch_name"
    fi
  else
    json_error "Not a git repository"
  fi
}
