vendor/libgit2/include/git2/merge.h in rugged-0.27.9 vs vendor/libgit2/include/git2/merge.h in rugged-0.27.10

- old
+ new

@@ -55,11 +55,11 @@ * @param opts the `git_merge_file_input` instance to initialize. * @param version the version of the struct; you should pass * `GIT_MERGE_FILE_INPUT_VERSION` here. * @return Zero on success; -1 on failure. */ -GIT_EXTERN(int) git_merge_file_init_input( +GIT_EXTERN(int) git_merge_file_input_init( git_merge_file_input *opts, unsigned int version); /** * Flags for `git_merge` options. A combination of these flags can be @@ -190,32 +190,31 @@ /** The file to favor in region conflicts. */ git_merge_file_favor_t favor; /** see `git_merge_file_flag_t` above */ - git_merge_file_flag_t flags; + uint32_t flags; /** The size of conflict markers (eg, "<<<<<<<"). Default is * GIT_MERGE_CONFLICT_MARKER_SIZE. */ unsigned short marker_size; } git_merge_file_options; #define GIT_MERGE_FILE_OPTIONS_VERSION 1 #define GIT_MERGE_FILE_OPTIONS_INIT {GIT_MERGE_FILE_OPTIONS_VERSION} /** + * Initialize git_merge_file_options structure + * * Initializes a `git_merge_file_options` with default values. Equivalent to - * creating an instance with GIT_MERGE_FILE_OPTIONS_INIT. + * creating an instance with `GIT_MERGE_FILE_OPTIONS_INIT`. * - * @param opts the `git_merge_file_options` instance to initialize. - * @param version the version of the struct; you should pass - * `GIT_MERGE_FILE_OPTIONS_VERSION` here. + * @param opts The `git_merge_file_options` struct to initialize. + * @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`. * @return Zero on success; -1 on failure. */ -GIT_EXTERN(int) git_merge_file_init_options( - git_merge_file_options *opts, - unsigned int version); +GIT_EXTERN(int) git_merge_file_options_init(git_merge_file_options *opts, unsigned int version); /** * Information about file-level merging */ typedef struct { @@ -246,11 +245,11 @@ */ typedef struct { unsigned int version; /** See `git_merge_flag_t` above */ - git_merge_flag_t flags; + uint32_t flags; /** * Similarity to consider a file renamed (default 50). If * `GIT_MERGE_FIND_RENAMES` is enabled, added files will be compared * with deleted files to determine their similarity. Files that are @@ -290,29 +289,28 @@ * (`text`) merge driver. */ git_merge_file_favor_t file_favor; /** see `git_merge_file_flag_t` above */ - git_merge_file_flag_t file_flags; + uint32_t file_flags; } git_merge_options; #define GIT_MERGE_OPTIONS_VERSION 1 #define GIT_MERGE_OPTIONS_INIT { \ GIT_MERGE_OPTIONS_VERSION, GIT_MERGE_FIND_RENAMES } /** + * Initialize git_merge_options structure + * * Initializes a `git_merge_options` with default values. Equivalent to - * creating an instance with GIT_MERGE_OPTIONS_INIT. + * creating an instance with `GIT_MERGE_OPTIONS_INIT`. * - * @param opts the `git_merge_options` instance to initialize. - * @param version the version of the struct; you should pass - * `GIT_MERGE_OPTIONS_VERSION` here. + * @param opts The `git_merge_options` struct to initialize. + * @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`. * @return Zero on success; -1 on failure. */ -GIT_EXTERN(int) git_merge_init_options( - git_merge_options *opts, - unsigned int version); +GIT_EXTERN(int) git_merge_options_init(git_merge_options *opts, unsigned int version); /** * The results of `git_merge_analysis` indicate the merge opportunities. */ typedef enum { @@ -381,9 +379,28 @@ */ GIT_EXTERN(int) git_merge_analysis( git_merge_analysis_t *analysis_out, git_merge_preference_t *preference_out, git_repository *repo, + const git_annotated_commit **their_heads, + size_t their_heads_len); + +/** + * Analyzes the given branch(es) and determines the opportunities for + * merging them into a reference. + * + * @param analysis_out analysis enumeration that the result is written into + * @param repo the repository to merge + * @param our_ref the reference to perform the analysis from + * @param their_heads the heads to merge into + * @param their_heads_len the number of heads to merge + * @return 0 on success or error code + */ +GIT_EXTERN(int) git_merge_analysis_for_ref( + git_merge_analysis_t *analysis_out, + git_merge_preference_t *preference_out, + git_repository *repo, + git_reference *our_ref, const git_annotated_commit **their_heads, size_t their_heads_len); /** * Find a merge base between two commits