]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
Simplify commit and tag parsing
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 79019c268027343e7944ceab6db35477219e861f..02ddddaa2bf669b3d65dd4f5570a013a8f1a7dd7 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -93,6 +93,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va
                        repo->email_filter = cgit_new_filter(value, EMAIL);
                else if (!strcmp(name, "owner-filter"))
                        repo->owner_filter = cgit_new_filter(value, OWNER);
+       } else if (!strcmp(name, "hide")) {
+               repo->hide = atoi(value);
+       } else if (!strcmp(name, "ignore")) {
+               repo->ignore = atoi(value);
        }
 }
 
@@ -599,7 +603,7 @@ static int prepare_repo_cmd(void)
                free(tmp);
                return 1;
        }
-       sort_string_list(&ctx.repo->submodules);
+       string_list_sort(&ctx.repo->submodules);
        cgit_prepare_repo_env(ctx.repo);
        choose_readme(ctx.repo);
        return 0;
@@ -828,6 +832,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
                else if (repo->commit_sort == 2)
                        fprintf(f, "repo.commit-sort=topo\n");
        }
+       fprintf(f, "repo.hide=%d\n", repo->hide);
+       fprintf(f, "repo.ignore=%d\n", repo->ignore);
        fprintf(f, "\n");
 }