(
config: EvoGitConfig, branch: str, worktree: Optional[str] = None
)
| 171 | |
| 172 | |
| 173 | def get_commit_by_branch( |
| 174 | config: EvoGitConfig, branch: str, worktree: Optional[str] = None |
| 175 | ) -> str: |
| 176 | cwd = worktree if worktree is not None else config.git_dir |
| 177 | return ( |
| 178 | subprocess.run( |
| 179 | ["git", "rev-parse", branch], |
| 180 | cwd=cwd, |
| 181 | check=True, |
| 182 | capture_output=True, |
| 183 | ) |
| 184 | .stdout.decode("utf-8") |
| 185 | .strip() |
| 186 | ) |
| 187 | |
| 188 | |
| 189 | def get_commit_by_tag( |
no outgoing calls
no test coverage detected