aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-summary.c')
-rw-r--r--ui-summary.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 947812a..dc4d0a6 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -66,11 +66,11 @@ void cgit_print_summary(void)
}
/* The caller must free the return value. */
-static char* append_readme_path(const char *filename, const char *ref, const char *path)
+static char* append_file_path(const char *filename, const char *ref, const char *path)
{
char *file, *base_dir, *full_path, *resolved_base = NULL, *resolved_full = NULL;
/* If a subpath is specified for the about page, make it relative
- * to the directory containing the configured readme. */
+ * to the directory containing the configured file. */
file = xstrdup(filename);
base_dir = dirname(file);
@@ -98,8 +98,7 @@ static char* append_readme_path(const char *filename, const char *ref, const cha
return full_path;
}
-
-void cgit_print_repo_readme(const char *path)
+void cgit_print_repo_info_file(struct string_list file, const char *path)
{
char *filename, *ref, *mimetype;
int free_filename = 0;
@@ -115,20 +114,20 @@ void cgit_print_repo_readme(const char *path)
free(mimetype);
cgit_print_layout_start();
- if (ctx.repo->readme.nr == 0)
+ if (file.nr == 0)
goto done;
- filename = ctx.repo->readme.items[0].string;
- ref = ctx.repo->readme.items[0].util;
+ filename = file.items[0].string;
+ ref = file.items[0].util;
if (path) {
free_filename = 1;
- filename = append_readme_path(filename, ref, path);
+ filename = append_file_path(filename, ref, path);
if (!filename)
goto done;
}
- /* Print the calculated readme, either from the git repo or from the
+ /* Print the calculated file, either from the git repo or from the
* filesystem, while applying the about-filter.
*/
html("<div id='summary'>");