(
branch_name: str,
cwd: str | None = None,
*,
checkout: bool = True,
start_point: str | None = None,
)
| 249 | |
| 250 | |
| 251 | def create_branch( |
| 252 | branch_name: str, |
| 253 | cwd: str | None = None, |
| 254 | *, |
| 255 | checkout: bool = True, |
| 256 | start_point: str | None = None, |
| 257 | ) -> bool: |
| 258 | args = ["checkout", "-b", branch_name] |
| 259 | if start_point: |
| 260 | args.append(start_point) |
| 261 | |
| 262 | if checkout: |
| 263 | _, _, rc = _run_git(args, cwd) |
| 264 | else: |
| 265 | create_args = ["branch", branch_name] |
| 266 | if start_point: |
| 267 | create_args.append(start_point) |
| 268 | _, _, rc = _run_git(create_args, cwd) |
| 269 | return rc == 0 |
| 270 | |
| 271 | |
| 272 | def get_commit_attribution( |