]> git.proxmox.com Git - libgit2.git/commitdiff
merge driver: correct indentation
authorEdward Thomson <ethomson@github.com>
Sun, 7 Feb 2016 23:19:43 +0000 (15:19 -0800)
committerEdward Thomson <ethomson@github.com>
Thu, 17 Mar 2016 15:02:27 +0000 (11:02 -0400)
src/merge.c
src/merge_driver.c

index 9a6442a91b3cf8b9f601006d6c6346eacbb8b407..5ef0f360967f6c2d3a3fdc61baa591e18eee5222 100644 (file)
@@ -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 ||
index 791afe0b7872a7001f5e17a444db31b3edf24be1..8795f2f2a765c32c9ac42a5af9750cd3face0271 100644 (file)
@@ -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(