Commit 46625836 by Edward Thomson

merge driver: correct indentation

parent 58d33126
......@@ -261,7 +261,7 @@ int git_merge_base(git_oid *out, git_repository *repo, const git_oid *one, const
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;
......@@ -925,8 +925,8 @@ static int merge_conflict_resolve_contents(
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;
......@@ -934,12 +934,12 @@ static int merge_conflict_resolve_contents(
&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);
......@@ -2199,14 +2199,14 @@ static int merge_annotated_commits(
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 ||
......
......@@ -143,20 +143,20 @@ static void merge_driver_registry_shutdown(void)
{
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(&reg->drivers, i, entry) {
if (entry && entry->driver->shutdown)
entry->driver->shutdown(entry->driver);
git_vector_foreach(&reg->drivers, i, entry) {
if (entry && entry->driver->shutdown)
entry->driver->shutdown(entry->driver);
git__free(entry);
}
git__free(entry);
}
git_vector_free(&reg->drivers);
git__free(reg);
git_vector_free(&reg->drivers);
git__free(reg);
}
git_merge_driver git_merge_driver__normal = {
......@@ -202,15 +202,15 @@ static int merge_driver_registry_initialize(void)
reg = git__calloc(1, sizeof(struct merge_driver_registry));
GITERR_CHECK_ALLOC(reg);
if ((error = git_vector_init(&reg->drivers, 3, merge_driver_entry_cmp)) < 0)
if ((error = git_vector_init(&reg->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 ||
......@@ -294,7 +294,7 @@ git_merge_driver *git_merge_driver_lookup(const char *name)
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 &&
......@@ -304,7 +304,7 @@ git_merge_driver *git_merge_driver_lookup(const char *name)
entry->initialized = 1;
}
return entry->driver;
return entry->driver;
}
static int merge_driver_name_for_path(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment