aboutsummaryrefslogtreecommitdiff
path: root/cgit.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/cgit.c b/cgit.c
index 8381630..93a7a69 100644
--- a/cgit.c
+++ b/cgit.c
@@ -457,15 +457,6 @@ char *build_snapshot_setting(int bitmap)
return result;
}
-char *get_first_line(char *txt)
-{
- char *t = xstrdup(txt);
- char *p = strchr(t, '\n');
- if (p)
- *p = '\0';
- return t;
-}
-
void print_repo(FILE *f, struct cgit_repo *repo)
{
fprintf(f, "repo.url=%s\n", repo->url);
@@ -473,11 +464,8 @@ void print_repo(FILE *f, struct cgit_repo *repo)
fprintf(f, "repo.path=%s\n", repo->path);
if (repo->owner)
fprintf(f, "repo.owner=%s\n", repo->owner);
- if (repo->desc) {
- char *tmp = get_first_line(repo->desc);
- fprintf(f, "repo.desc=%s\n", tmp);
- free(tmp);
- }
+ if (repo->desc)
+ fprintf(f, "repo.desc=%s\n", repo->desc);
if (repo->readme)
fprintf(f, "repo.readme=%s\n", repo->readme);
if (repo->defbranch)