MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / count_conflicts

Function count_conflicts

python-impl/evogit/utils/git.py:494–502  ·  view source on GitHub ↗

Count the number of conflicts in the current working directory.

(config: EvoGitConfig, filename: Optional[str] = None)

Source from the content-addressed store, hash-verified

492
493
494def 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
505def list_conflict_files(config: EvoGitConfig) -> list[str]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected