int git_merge_bases(git_oidarray *out, git_repository *repo, const git_oid *one, const git_oid *two)
{
int error;
- git_revwalk *walk;
+ git_revwalk *walk;
git_commit_list *result, *list;
git_array_oid_t array;
goto done;
}
- error = merge_conflict_invoke_driver(&merge_result,
- driver, data, diff_list, &source);
+ error = merge_conflict_invoke_driver(&merge_result,
+ driver, data, diff_list, &source);
if (error == GIT_PASSTHROUGH) {
data = NULL;
&git_merge_driver__text, data, diff_list, &source);
}
- if (error < 0) {
- if (error == GIT_EMERGECONFLICT)
- error = 0;
+ if (error < 0) {
+ if (error == GIT_EMERGECONFLICT)
+ error = 0;
- goto done;
- }
+ goto done;
+ }
git_vector_insert(&diff_list->staged, merge_result);
git_vector_insert(&diff_list->resolved, (git_merge_diff *)conflict);
git_iterator *base_iter = NULL, *our_iter = NULL, *their_iter = NULL;
int error;
- if ((error = compute_base(&base, repo, ours, theirs, opts,
+ if ((error = compute_base(&base, repo, ours, theirs, opts,
recursion_level)) < 0) {
- if (error != GIT_ENOTFOUND)
- goto done;
+ if (error != GIT_ENOTFOUND)
+ goto done;
- giterr_clear();
- }
+ giterr_clear();
+ }
if ((error = iterator_for_annotated_commit(&base_iter, base)) < 0 ||
(error = iterator_for_annotated_commit(&our_iter, ours)) < 0 ||
{
struct merge_driver_registry *reg;
git_merge_driver_entry *entry;
- size_t i;
+ size_t i;
- if ((reg = git__swap(merge_driver_registry, NULL)) == NULL)
- return;
+ if ((reg = git__swap(merge_driver_registry, NULL)) == NULL)
+ return;
- git_vector_foreach(®->drivers, i, entry) {
- if (entry && entry->driver->shutdown)
- entry->driver->shutdown(entry->driver);
+ git_vector_foreach(®->drivers, i, entry) {
+ if (entry && entry->driver->shutdown)
+ entry->driver->shutdown(entry->driver);
- git__free(entry);
- }
+ git__free(entry);
+ }
- git_vector_free(®->drivers);
- git__free(reg);
+ git_vector_free(®->drivers);
+ git__free(reg);
}
git_merge_driver git_merge_driver__normal = {
reg = git__calloc(1, sizeof(struct merge_driver_registry));
GITERR_CHECK_ALLOC(reg);
- if ((error = git_vector_init(®->drivers, 3, merge_driver_entry_cmp)) < 0)
+ if ((error = git_vector_init(®->drivers, 3, merge_driver_entry_cmp)) < 0)
goto done;
- reg = git__compare_and_swap(&merge_driver_registry, NULL, reg);
+ reg = git__compare_and_swap(&merge_driver_registry, NULL, reg);
- if (reg != NULL)
- goto done;
+ if (reg != NULL)
+ goto done;
- git__on_shutdown(merge_driver_registry_shutdown);
+ git__on_shutdown(merge_driver_registry_shutdown);
if ((error = git_merge_driver_register(
merge_driver_name__text, &git_merge_driver__text)) < 0 ||
if (error == GIT_ENOTFOUND)
return NULL;
- entry = git_vector_get(&merge_driver_registry->drivers, pos);
+ entry = git_vector_get(&merge_driver_registry->drivers, pos);
if (!entry->initialized) {
if (entry->driver->initialize &&
entry->initialized = 1;
}
- return entry->driver;
+ return entry->driver;
}
static int merge_driver_name_for_path(