Commit b1731215 by Ben Straub

Simple readability fixes.

parent 20ec426d
...@@ -12,7 +12,9 @@ static git_repository *g_repo; ...@@ -12,7 +12,9 @@ static git_repository *g_repo;
// Helpers // Helpers
static void ensure_tag_pattern_match(git_repository *repo, const char *pattern, const size_t expected_matches) static void ensure_tag_pattern_match(git_repository *repo,
const char *pattern,
const size_t expected_matches)
{ {
git_strarray tag_list; git_strarray tag_list;
int error = GIT_SUCCESS; int error = GIT_SUCCESS;
......
...@@ -14,7 +14,10 @@ static git_repository *g_repo; ...@@ -14,7 +14,10 @@ static git_repository *g_repo;
#ifndef GIT_WIN32 #ifndef GIT_WIN32
#include "odb.h" #include "odb.h"
static void locate_loose_object(const char *repository_folder, git_object *object, char **out, char **out_folder) static void locate_loose_object(const char *repository_folder,
git_object *object,
char **out,
char **out_folder)
{ {
static const char *objects_folder = "objects/"; static const char *objects_folder = "objects/";
......
...@@ -24,7 +24,10 @@ void test_object_tree_frompath__cleanup(void) ...@@ -24,7 +24,10 @@ void test_object_tree_frompath__cleanup(void)
cl_fixture_cleanup("testrepo.git"); cl_fixture_cleanup("testrepo.git");
} }
static void assert_tree_from_path(git_tree *root, const char *path, git_error expected_result, const char *expected_raw_oid) static void assert_tree_from_path(git_tree *root,
const char *path,
git_error expected_result,
const char *expected_raw_oid)
{ {
git_tree *containing_tree = NULL; git_tree *containing_tree = NULL;
...@@ -35,7 +38,7 @@ static void assert_tree_from_path(git_tree *root, const char *path, git_error ex ...@@ -35,7 +38,7 @@ static void assert_tree_from_path(git_tree *root, const char *path, git_error ex
cl_assert(containing_tree != NULL && expected_result == GIT_SUCCESS); cl_assert(containing_tree != NULL && expected_result == GIT_SUCCESS);
cl_assert(git_oid_streq(git_object_id((const git_object *)containing_tree), expected_raw_oid) == GIT_SUCCESS); cl_git_pass(git_oid_streq(git_object_id((const git_object *)containing_tree), expected_raw_oid));
git_tree_free(containing_tree); git_tree_free(containing_tree);
} }
......
...@@ -39,7 +39,10 @@ static int print_tree(git_repository *repo, const git_oid *tree_oid, int depth) ...@@ -39,7 +39,10 @@ static int print_tree(git_repository *repo, const git_oid *tree_oid, int depth)
return GIT_SUCCESS; return GIT_SUCCESS;
} }
static void locate_loose_object(const char *repository_folder, git_object *object, char **out, char **out_folder) static void locate_loose_object(const char *repository_folder,
git_object *object,
char **out,
char **out_folder)
{ {
static const char *objects_folder = "objects/"; static const char *objects_folder = "objects/";
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
// Helpers // Helpers
static void ensure_refname_normalized(int is_oid_ref, const char *input_refname, const char *expected_refname) static void ensure_refname_normalized(int is_oid_ref,
const char *input_refname,
const char *expected_refname)
{ {
char buffer_out[GIT_REFNAME_MAX]; char buffer_out[GIT_REFNAME_MAX];
......
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
#define ALTERNATE_MALFORMED_FOLDER3 DISCOVER_FOLDER "/alternate_malformed_repo3" #define ALTERNATE_MALFORMED_FOLDER3 DISCOVER_FOLDER "/alternate_malformed_repo3"
#define ALTERNATE_NOT_FOUND_FOLDER DISCOVER_FOLDER "/alternate_not_found_repo" #define ALTERNATE_NOT_FOUND_FOLDER DISCOVER_FOLDER "/alternate_not_found_repo"
static void ensure_repository_discover(const char *start_path, const char *ceiling_dirs, const char *expected_path) static void ensure_repository_discover(const char *start_path,
const char *ceiling_dirs,
const char *expected_path)
{ {
char found_path[GIT_PATH_MAX]; char found_path[GIT_PATH_MAX];
cl_git_pass(git_repository_discover(found_path, sizeof(found_path), start_path, 0, ceiling_dirs)); cl_git_pass(git_repository_discover(found_path, sizeof(found_path), start_path, 0, ceiling_dirs));
......
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