merge driver: correct indentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
diff --git a/src/merge.c b/src/merge.c
index 9a6442a..5ef0f36 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -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 ||
diff --git a/src/merge_driver.c b/src/merge_driver.c
index 791afe0..8795f2f 100644
--- a/src/merge_driver.c
+++ b/src/merge_driver.c
@@ -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(®->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 = {
@@ -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(®->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 ||
@@ -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(