hack-codegen
hack-codegen copied to clipboard
Add guidance for resolving merge conflicts for generated files
IIRC, Facebook has a custom merge driver for Mercurial that can automatically resolve conflicts for generated files. Before this was in place I believe one had to manually re-generate code that had conflicts. Would it be possible to:
- open source the merge driver(s)
- also provide them for Git
- document these, or what to do in the absence of these
open source the merge driver(s)
I think the relevant code is here: https://github.com/facebookexperimental/eden/blob/master/eden/scm/edenscm/hgext/mergedriver.py
Unfortunately I can't find any good documentation, but there are some tests that can be used as examples: https://github.com/facebookexperimental/eden/search?q=mergedriver&unscoped_q=mergedriver
I agree this should be mentioned somewhere in this repository and better documented, keeping this issue open for that.