diff options
author | Elijah Newren <newren@gmail.com> | 2020-12-13 09:04:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-13 23:18:19 +0100 |
commit | 0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3 (patch) | |
tree | 78c6520da3daf05273074fb144b4de1c17819515 /merge-ort.h | |
parent | merge-ort: use histogram diff (diff) | |
download | git-0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3.tar.xz git-0c0d705b5cba39c70b01b8b21e2c4d3ca014daf3.zip |
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.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/merge-ort.h b/merge-ort.h index 74adccad16..55ae7ee865 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; /* |