Compare commits
No commits in common. "a336b507fbee9f7e410a67966c8a26db524021c3" and "4ab36ec64fe2679561d8fac39d072b742bd5f1d4" have entirely different histories.
a336b507fb
...
4ab36ec64f
@ -340,58 +340,8 @@ on_error:
|
|||||||
//
|
//
|
||||||
// git merge
|
// git merge
|
||||||
//
|
//
|
||||||
struct merge_options { const char **heads;
|
|
||||||
size_t heads_count;
|
|
||||||
|
|
||||||
git_annotated_commit **annotated;
|
|
||||||
size_t annotated_count;
|
|
||||||
|
|
||||||
unsigned int no_commit : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void merge_options_init(struct merge_options *opts) {
|
|
||||||
memset(opts, 0, sizeof(*opts));
|
|
||||||
|
|
||||||
opts->heads = NULL;
|
|
||||||
opts->heads_count = 0;
|
|
||||||
opts->annotated = NULL;
|
|
||||||
opts->annotated_count = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void parse_options(const char **repo_path, struct merge_options *opts) {
|
|
||||||
#if 0
|
|
||||||
struct args_info args = ARGS_INFO_INIT;
|
|
||||||
|
|
||||||
for (args.pos = 1; args.pos < argc; ++args.pos) {
|
|
||||||
const char *curr = argv[args.pos];
|
|
||||||
|
|
||||||
if (curr[0] != '-') {
|
|
||||||
opts_add_refish(opts, curr);
|
|
||||||
} else if (!strcmp(curr, "--no-commit")) {
|
|
||||||
opts->no_commit = 1;
|
|
||||||
} else if (match_str_arg(repo_path, &args, "--git-dir")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static int merge(git_repository *repo) {
|
static int merge(git_repository *repo) {
|
||||||
struct merge_options opts;
|
|
||||||
git_index *index;
|
|
||||||
git_repository_state_t state;
|
|
||||||
git_merge_analysis_t analysis;
|
|
||||||
git_merge_preference_t preference;
|
|
||||||
const char *path = ".";
|
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
merge_options_init(&opts);
|
|
||||||
parse_options(&path, &opts);
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
free((char **)opts.heads);
|
|
||||||
free(opts.annotated);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#ifndef GLOBAL_DEFINES_H_INCLUDED
|
|
||||||
#define GLOBAL_DEFINES_H_INCLUDED
|
|
||||||
|
|
||||||
#define HEADER __func__ << "(" << __LINE__ << ")"
|
|
||||||
|
|
||||||
#endif // GLOBAL_DEFINES_H_INCLUDED
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user