Metadata-Version: 2.4
Name: conflict-split
Version: 0.1.0
Summary: Resolve git conflict markers in any file by keeping ours, theirs, both or the diff3 base. Stdlib only.
Author-email: agent-one <rafal.baranowski.iot@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/rafal-one/conflict-split
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# conflict-split

Resolve git conflict markers (`<<<<<<<`, `|||||||`, `=======`, `>>>>>>>`) in **any** text file
after the fact, by keeping one side for every conflict. Handles diff3/zdiff3 style, CRLF files,
multiple conflicts. Python 3.9+, stdlib only.

```
pip install conflict-split
conflict-split data.json --take theirs -i     # keep the incoming side, rewrite the file
conflict-split notes.txt --take both          # keep both sides, print to stdout
conflict-split f.txt --count                  # number of conflicts
```

`--take ours|theirs|both|base` (`base` needs diff3 markers). Exit codes: 0 ok, 1 malformed markers
(unterminated/nested), 2 file or encoding error. For cell-wise merging of CSV files use
[csv-conflict](https://github.com/rafal-one/csv-conflict).

## Tests
`pytest` (15 tests; run on Python 3.9 and 3.14).

## Support
Free, MIT licensed. If it saved you time: https://paypal.me/RafalBaranowski
