#include "merge.h"
#include "git2/merge.h"
-#define AUTOMERGEABLE_MERGED_FILE \
- "this file is changed in master\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is automergeable\n" \
- "this file is changed in branch\n"
-
-#define AUTOMERGEABLE_MERGED_FILE_CRLF \
- "this file is changed in master\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is automergeable\r\n" \
- "this file is changed in branch\r\n"
-
-#define CONFLICTING_MERGE_FILE \
- "<<<<<<< HEAD\n" \
- "this file is changed in master and branch\n" \
- "=======\n" \
- "this file is changed in branch and master\n" \
- ">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
-
-#define CONFLICTING_DIFF3_FILE \
- "<<<<<<< HEAD\n" \
- "this file is changed in master and branch\n" \
- "||||||| initial\n" \
- "this file is a conflict\n" \
- "=======\n" \
- "this file is changed in branch and master\n" \
- ">>>>>>> 7cb63eed597130ba4abb87b3e544b85021905520\n"
-
-#define CONFLICTING_UNION_FILE \
- "this file is changed in master and branch\n" \
- "this file is changed in branch and master\n"
-
-
struct merge_index_entry {
uint16_t mode;
- char oid_str[41];
+ char oid_str[GIT_OID_HEXSZ+1];
int stage;
char path[128];
};
unsigned int ancestor_mode;
unsigned int our_mode;
unsigned int their_mode;
- char ancestor_oid_str[41];
- char our_oid_str[41];
- char their_oid_str[41];
+ char ancestor_oid_str[GIT_OID_HEXSZ+1];
+ char our_oid_str[GIT_OID_HEXSZ+1];
+ char their_oid_str[GIT_OID_HEXSZ+1];
};
struct merge_index_conflict_data {
struct merge_index_with_status ancestor;
struct merge_index_with_status ours;
struct merge_index_with_status theirs;
- git_merge_diff_type_t change_type;
+ git_merge_diff_t change_type;
};
int merge_trees_from_branches(