From c43c233c9b14e65d461405857c6e6c758cd9fb23 Mon Sep 17 00:00:00 2001 From: Anshul Gupta Date: Fri, 11 Apr 2025 12:54:54 -0700 Subject: Allow for multiple owners and tokens --- src/git.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/git.c') diff --git a/src/git.c b/src/git.c index 7289362..8d5673f 100644 --- a/src/git.c +++ b/src/git.c @@ -207,8 +207,7 @@ static int create_mirror(const char *path, const struct repo_ctx *ctx) static int create_git_path(const struct repo_ctx *ctx) { // Create owner directory if it doesn't exist - char *owner_path = - get_git_path(ctx->cfg->git_base, ctx->cfg->owner, NULL); + char *owner_path = get_git_path(ctx->git_base, ctx->cfg->owner, NULL); if (!owner_path) return -1; if (mkdir(owner_path, 0755) == -1 && errno != EEXIST) { @@ -219,8 +218,8 @@ static int create_git_path(const struct repo_ctx *ctx) free(owner_path); // Create repo directory if it doesn't exist - char *repo_path = get_git_path(ctx->cfg->git_base, ctx->cfg->owner, - ctx->name); + char *repo_path = + get_git_path(ctx->git_base, ctx->cfg->owner, ctx->name); if (!repo_path) return -1; if (mkdir(repo_path, 0755) == -1 && errno != EEXIST) { @@ -275,8 +274,7 @@ static int update_mirror(const char *path) int git_mirror_repo(const struct repo_ctx *ctx) { int ret = 0; - char *path = get_git_path(ctx->cfg->git_base, ctx->cfg->owner, - ctx->name); + char *path = get_git_path(ctx->git_base, ctx->cfg->owner, ctx->name); if (!path) { perror("get_git_path"); return -1; -- cgit v1.2.3