aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/technical/api-merge.adoc
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2025-01-20 01:56:02 +0000
committerJunio C Hamano <gitster@pobox.com>2025-01-21 12:56:06 -0800
commit1f010d6bdf756129db13d1367c888aa4153f6d87 (patch)
tree715708841b4980198157a60e72028e25a0059177 /Documentation/technical/api-merge.adoc
parentgitattributes: mark AsciiDoc files as LF-only (diff)
downloadgit-1f010d6bdf756129db13d1367c888aa4153f6d87.tar.gz
git-1f010d6bdf756129db13d1367c888aa4153f6d87.zip
doc: use .adoc extension for AsciiDoc files
We presently use the ".txt" extension for our AsciiDoc files. While not wrong, most editors do not associate this extension with AsciiDoc, meaning that contributors don't get automatic editor functionality that could be useful, such as syntax highlighting and prose linting. It is much more common to use the ".adoc" extension for AsciiDoc files, since this helps editors automatically detect files and also allows various forges to provide rich (HTML-like) rendering. Let's do that here, renaming all of the files and updating the includes where relevant. Adjust the various build scripts and makefiles to use the new extension as well. Note that this should not result in any user-visible changes to the documentation. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-merge.adoc')
-rw-r--r--Documentation/technical/api-merge.adoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/technical/api-merge.adoc b/Documentation/technical/api-merge.adoc
new file mode 100644
index 0000000000..c2ba01828c
--- /dev/null
+++ b/Documentation/technical/api-merge.adoc
@@ -0,0 +1,36 @@
+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 merge-ll.h for details.
+
+Low-level (single file) merge
+-----------------------------
+
+Check merge-ll.h for details.