mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
d3d7172e40
Move the related documentation from Documentation/technical/api-merge.txt to ll-merge.h as it's easier for the developers to find the usage information beside the code instead of looking for it in another doc file. Only the ll-merge related doc is removed from documentation/technical/api-merge.txt because this information will be redundant and it'll be hard to keep it up to date and synchronized with the documentation in ll-merge.h. Signed-off-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
36 lines
1.1 KiB
Text
36 lines
1.1 KiB
Text
merge API
|
|
=========
|
|
|
|
The merge API helps a program to reconcile two competing sets of
|
|
improvements to some files (e.g., unregistered changes from the work
|
|
tree versus changes involved in switching to a new branch), reporting
|
|
conflicts if found. The library called through this API is
|
|
responsible for a few things.
|
|
|
|
* determining which trees to merge (recursive ancestor consolidation);
|
|
|
|
* lining up corresponding files in the trees to be merged (rename
|
|
detection, subtree shifting), reporting edge cases like add/add
|
|
and rename/rename conflicts to the user;
|
|
|
|
* performing a three-way merge of corresponding files, taking
|
|
path-specific merge drivers (specified in `.gitattributes`)
|
|
into account.
|
|
|
|
Data structures
|
|
---------------
|
|
|
|
* `mmbuffer_t`, `mmfile_t`
|
|
|
|
These store data usable for use by the xdiff backend, for writing and
|
|
for reading, respectively. See `xdiff/xdiff.h` for the definitions
|
|
and `diff.c` for examples.
|
|
|
|
* `struct ll_merge_options`
|
|
|
|
Check ll-merge.h for details.
|
|
|
|
Low-level (single file) merge
|
|
-----------------------------
|
|
|
|
Check ll-merge.h for details.
|