Count the number of conflicts in the current working directory.
(config: EvoGitConfig, filename: Optional[str] = None)
| 492 | |
| 493 | |
| 494 | def count_conflicts(config: EvoGitConfig, filename: Optional[str] = None) -> int: |
| 495 | """Count the number of conflicts in the current working directory.""" |
| 496 | if filename is None: |
| 497 | filename = config.filename |
| 498 | |
| 499 | with open(os.path.join(config.git_dir, filename), "r") as f: |
| 500 | content = f.read() |
| 501 | |
| 502 | return len(git_conflict_pattern.findall(content)) |
| 503 | |
| 504 | |
| 505 | def list_conflict_files(config: EvoGitConfig) -> list[str]: |
nothing calls this directly
no outgoing calls
no test coverage detected