MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / parse_merge_msg_for_conflicts

Function parse_merge_msg_for_conflicts

pre_commit/git.py:104–111  ·  view source on GitHub ↗
(merge_msg: bytes)

Source from the content-addressed store, hash-verified

102
103
104def parse_merge_msg_for_conflicts(merge_msg: bytes) -> list[str]:
105 # Conflicted files start with tabs
106 return [
107 line.lstrip(b'#').strip().decode()
108 for line in merge_msg.splitlines()
109 # '#\t' for git 2.4.1
110 if line.startswith((b'\t', b'#\t'))
111 ]
112
113
114def get_conflicted_files() -> set[str]:

Callers 1

get_conflicted_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected