about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cgit.h2
-rw-r--r--shared.c4
-rw-r--r--ui-log.c2
-rw-r--r--ui-summary.c2
4 files changed, 8 insertions, 2 deletions
diff --git a/cgit.h b/cgit.h index 9b517a7..a3b5385 100644 --- a/cgit.h +++ b/cgit.h
@@ -52,6 +52,8 @@ extern int cgit_cache_dynamic_ttl;
52extern int cgit_cache_static_ttl; 52extern int cgit_cache_static_ttl;
53extern int cgit_cache_max_create_time; 53extern int cgit_cache_max_create_time;
54 54
55extern int cgit_max_msg_len;
56
55extern char *cgit_repo_name; 57extern char *cgit_repo_name;
56extern char *cgit_repo_desc; 58extern char *cgit_repo_desc;
57extern char *cgit_repo_owner; 59extern char *cgit_repo_owner;
diff --git a/shared.c b/shared.c index dd711a8..8e6df31 100644 --- a/shared.c +++ b/shared.c
@@ -25,6 +25,8 @@ int cgit_cache_dynamic_ttl = 5;
25int cgit_cache_static_ttl = -1; 25int cgit_cache_static_ttl = -1;
26int cgit_cache_max_create_time = 5; 26int cgit_cache_max_create_time = 5;
27 27
28int cgit_max_msg_len = 60;
29
28char *cgit_repo_name = NULL; 30char *cgit_repo_name = NULL;
29char *cgit_repo_desc = NULL; 31char *cgit_repo_desc = NULL;
30char *cgit_repo_owner = NULL; 32char *cgit_repo_owner = NULL;
@@ -70,6 +72,8 @@ void cgit_global_config_cb(const char *name, const char *value)
70 cgit_cache_static_ttl = atoi(value); 72 cgit_cache_static_ttl = atoi(value);
71 else if (!strcmp(name, "cache-dynamic-ttl")) 73 else if (!strcmp(name, "cache-dynamic-ttl"))
72 cgit_cache_dynamic_ttl = atoi(value); 74 cgit_cache_dynamic_ttl = atoi(value);
75 else if (!strcmp(name, "max-message-length"))
76 cgit_max_msg_len = atoi(value);
73} 77}
74 78
75void cgit_repo_config_cb(const char *name, const char *value) 79void cgit_repo_config_cb(const char *name, const char *value)
diff --git a/ui-log.c b/ui-log.c index 725f49b..24d571d 100644 --- a/ui-log.c +++ b/ui-log.c
@@ -23,7 +23,7 @@ void print_commit(struct commit *commit)
23 char *qry = fmt("id=%s", sha1_to_hex(commit->object.sha1)); 23 char *qry = fmt("id=%s", sha1_to_hex(commit->object.sha1));
24 char *url = cgit_pageurl(cgit_query_repo, "commit", qry); 24 char *url = cgit_pageurl(cgit_query_repo, "commit", qry);
25 html_link_open(url, NULL, NULL); 25 html_link_open(url, NULL, NULL);
26 html_ntxt(80, info->subject); 26 html_ntxt(cgit_max_msg_len, info->subject);
27 html_link_close(); 27 html_link_close();
28 html("</td><td>"); 28 html("</td><td>");
29 html_txt(info->author); 29 html_txt(info->author);
diff --git a/ui-summary.c b/ui-summary.c index 04d4912..5518d01 100644 --- a/ui-summary.c +++ b/ui-summary.c
@@ -33,7 +33,7 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1,
33 url = cgit_pageurl(cgit_query_repo, "commit", 33 url = cgit_pageurl(cgit_query_repo, "commit",
34 fmt("id=%s", sha1_to_hex(sha1))); 34 fmt("id=%s", sha1_to_hex(sha1)));
35 html_link_open(url, NULL, NULL); 35 html_link_open(url, NULL, NULL);
36 html_ntxt(80, info->subject); 36 html_ntxt(cgit_max_msg_len, info->subject);
37 html_link_close(); 37 html_link_close();
38 html("</td></tr>\n"); 38 html("</td></tr>\n");
39 cgit_free_commitinfo(info); 39 cgit_free_commitinfo(info);