summaryrefslogtreecommitdiff
path: root/merge-ort.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-12-13 08:04:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-13 22:18:19 (GMT)
commit0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3 (patch)
tree78c6520da3daf05273074fb144b4de1c17819515 /merge-ort.h
parentc8017176ac8fb5cc85ca8742bbdeec8943427340 (diff)
downloadgit-0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3.zip
git-0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3.tar.gz
git-0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3.tar.bz2
merge-ort: add an err() function similar to one from merge-recursive
Various places in merge-recursive used an err() function when it hit some kind of unrecoverable error. That code was from the reusable bits of merge-recursive.c that we liked, such as merge_3way, writing object files to the object store, reading blobs from the object store, etc. So create a similar function to allow us to port that code over, and use it for when we detect problems returned from collect_merge_info()'s traverse_trees() call, which we will be adding next. While we are at it, also add more documentation for the "clean" field from struct merge_result, particularly since the name suggests a boolean but it is not quite one and this is our first non-boolean usage. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.h')
-rw-r--r--merge-ort.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/merge-ort.h b/merge-ort.h
index 74adcca..55ae7ee 100644
--- a/merge-ort.h
+++ b/merge-ort.h
@@ -7,7 +7,14 @@ struct commit;
struct tree;
struct merge_result {
- /* Whether the merge is clean */
+ /*
+ * Whether the merge is clean; possible values:
+ * 1: clean
+ * 0: not clean (merge conflicts)
+ * <0: operation aborted prematurely. (object database
+ * unreadable, disk full, etc.) Worktree may be left in an
+ * inconsistent state if operation failed near the end.
+ */
int clean;
/*