notes-merge: convert notes_merge* to struct object_id
Convert notes_merge and notes_merge_commit to use struct object_id. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
7b8dea0c75
commit
5237e0eb59
@ -32,16 +32,16 @@ void init_notes_merge_options(struct notes_merge_options *o);
|
||||
* outcomes:
|
||||
*
|
||||
* 1. The merge trivially results in an existing commit (e.g. fast-forward or
|
||||
* already-up-to-date). 'local_tree' is untouched, the SHA1 of the result
|
||||
* is written into 'result_sha1' and 0 is returned.
|
||||
* already-up-to-date). 'local_tree' is untouched, the OID of the result
|
||||
* is written into 'result_oid' and 0 is returned.
|
||||
* 2. The merge successfully completes, producing a merge commit. local_tree
|
||||
* contains the updated notes tree, the SHA1 of the resulting commit is
|
||||
* written into 'result_sha1', and 1 is returned.
|
||||
* contains the updated notes tree, the OID of the resulting commit is
|
||||
* written into 'result_oid', and 1 is returned.
|
||||
* 3. The merge results in conflicts. This is similar to #2 in that the
|
||||
* partial merge result (i.e. merge result minus the unmerged entries)
|
||||
* are stored in 'local_tree', and the SHA1 or the resulting commit
|
||||
* are stored in 'local_tree', and the OID or the resulting commit
|
||||
* (to be amended when the conflicts have been resolved) is written into
|
||||
* 'result_sha1'. The unmerged entries are written into the
|
||||
* 'result_oid'. The unmerged entries are written into the
|
||||
* .git/NOTES_MERGE_WORKTREE directory with conflict markers.
|
||||
* -1 is returned.
|
||||
*
|
||||
@ -52,7 +52,7 @@ void init_notes_merge_options(struct notes_merge_options *o);
|
||||
*/
|
||||
int notes_merge(struct notes_merge_options *o,
|
||||
struct notes_tree *local_tree,
|
||||
unsigned char *result_sha1);
|
||||
struct object_id *result_oid);
|
||||
|
||||
/*
|
||||
* Finalize conflict resolution from an earlier notes_merge()
|
||||
@ -62,13 +62,13 @@ int notes_merge(struct notes_merge_options *o,
|
||||
* call to notes_merge().
|
||||
*
|
||||
* This function will add the (now resolved) notes in .git/NOTES_MERGE_WORKTREE
|
||||
* to 'partial_tree', and create a final notes merge commit, the SHA1 of which
|
||||
* will be stored in 'result_sha1'.
|
||||
* to 'partial_tree', and create a final notes merge commit, the OID of which
|
||||
* will be stored in 'result_oid'.
|
||||
*/
|
||||
int notes_merge_commit(struct notes_merge_options *o,
|
||||
struct notes_tree *partial_tree,
|
||||
struct commit *partial_commit,
|
||||
unsigned char *result_sha1);
|
||||
struct object_id *result_oid);
|
||||
|
||||
/*
|
||||
* Abort conflict resolution from an earlier notes_merge()
|
||||
|
Reference in New Issue
Block a user