summaryrefslogtreecommitdiff
path: root/src/git.c
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2025-04-11 12:54:54 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2025-04-11 12:57:13 -0700
commitc43c233c9b14e65d461405857c6e6c758cd9fb23 (patch)
treea2dc536661010dae8ed1e3dfc2a899476b4a2779 /src/git.c
parent11f44a70736de47ec7eca82860ed6780d273749e (diff)
downloadgithub-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.tar.gz
github-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.tar.zst
github-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.zip
Allow for multiple owners and tokens
Diffstat (limited to 'src/git.c')
-rw-r--r--src/git.c10
1 files changed, 4 insertions, 6 deletions
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;