From 1160cdb21e0b667269299853cb47a4aa88948dc3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 12 Jun 2026 17:20:08 +0200 Subject: unify my .clang-format files --- src/ci.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'src/ci.c') diff --git a/src/ci.c b/src/ci.c index d906fc4..a2bd2f0 100644 --- a/src/ci.c +++ b/src/ci.c @@ -6,12 +6,14 @@ */ #include "ci.h" + #include "file.h" #include "git.h" #include "log.h" #include "process.h" #include + #include #include @@ -31,15 +33,13 @@ static const char *ci_env[] = { }; /* clang-format on */ -static int ci_run_script(const char *script, struct process_output *result) -{ - const char *args[] = {script, NULL}; +static int ci_run_script(const char* script, struct process_output* result) { + const char* args[] = {script, NULL}; return process_execute_and_capture(args, ci_env, result); } -int ci_run(struct process_output *result) -{ - for (const char **script = ci_scripts; *script; ++script) { +int ci_run(struct process_output* result) { + for (const char** script = ci_scripts; *script; ++script) { if (!file_exists(*script)) continue; log("Going to run: %s\n", *script); @@ -50,14 +50,12 @@ int ci_run(struct process_output *result) return -1; } -static void ci_cleanup_git_repo(git_repository *repo) -{ +static void ci_cleanup_git_repo(git_repository* repo) { rm_rf(git_repository_workdir(repo)); libgit_repository_free(repo); } -static int ci_prepare_git_repo(git_repository **repo, const char *url, const char *rev) -{ +static int ci_prepare_git_repo(git_repository** repo, const char* url, const char* rev) { int ret = 0; ret = libgit_clone_to_tmp(repo, url); @@ -76,10 +74,9 @@ cleanup_repo: return ret; } -int ci_run_git_repo(const char *url, const char *rev, struct process_output *output) -{ - char *oldpwd = NULL; - git_repository *repo = NULL; +int ci_run_git_repo(const char* url, const char* rev, struct process_output* output) { + char* oldpwd = NULL; + git_repository* repo = NULL; int ret = 0; ret = ci_prepare_git_repo(&repo, url, rev); -- cgit v1.3