api-merge.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. merge API
  2. =========
  3. The merge API helps a program to reconcile two competing sets of
  4. improvements to some files (e.g., unregistered changes from the work
  5. tree versus changes involved in switching to a new branch), reporting
  6. conflicts if found. The library called through this API is
  7. responsible for a few things.
  8. * determining which trees to merge (recursive ancestor consolidation);
  9. * lining up corresponding files in the trees to be merged (rename
  10. detection, subtree shifting), reporting edge cases like add/add
  11. and rename/rename conflicts to the user;
  12. * performing a three-way merge of corresponding files, taking
  13. path-specific merge drivers (specified in `.gitattributes`)
  14. into account.
  15. Data structures
  16. ---------------
  17. * `mmbuffer_t`, `mmfile_t`
  18. These store data usable for use by the xdiff backend, for writing and
  19. for reading, respectively. See `xdiff/xdiff.h` for the definitions
  20. and `diff.c` for examples.
  21. * `struct ll_merge_options`
  22. Check ll-merge.h for details.
  23. Low-level (single file) merge
  24. -----------------------------
  25. Check ll-merge.h for details.