mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
c8017176ac
commit
0c0d705b5c
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user