about summary refs log tree commit diff
path: root/ui-shared.c
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2014-10-05 10:59:02 +0100
committerLukas Fleischer <cgit@cryptocrack.de>2014-12-13 12:38:42 +0100
commiteeddb5bc0905d4728001a111a9b1eb60ecccf9bd (patch)
treee1193c55a604584acc8e3198838b358d44a65133 /ui-shared.c
parentgit: update to v2.0.4 (diff)
downloadcgit-pink-eeddb5bc0905d4728001a111a9b1eb60ecccf9bd.tar.gz
cgit-pink-eeddb5bc0905d4728001a111a9b1eb60ecccf9bd.zip
ui-shared: remove toggle_ssdiff arg to cgit_commit_link()
This argument is never used with a value other than zero, so remove it
and simplify the code.

Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to '')
-rw-r--r--ui-shared.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 9dde0a3..497dfd0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -328,8 +328,7 @@ void cgit_log_link(const char *name, const char *title, const char *class,
 }
 
 void cgit_commit_link(char *name, const char *title, const char *class,
-		      const char *head, const char *rev, const char *path,
-		      int toggle_ssdiff)
+		      const char *head, const char *rev, const char *path)
 {
 	if (strlen(name) > ctx.cfg.max_msg_len && ctx.cfg.max_msg_len >= 15) {
 		name[ctx.cfg.max_msg_len] = '\0';
@@ -347,7 +346,7 @@ void cgit_commit_link(char *name, const char *title, const char *class,
 		html_url_arg(rev);
 		delim = "&amp;";
 	}
-	if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) {
+	if (ctx.qry.ssdiff) {
 		html(delim);
 		html("ss=1");
 		delim = "&amp;";
@@ -463,7 +462,7 @@ static void cgit_self_link(char *name, const char *title, const char *class)
 	else if (!strcmp(ctx.qry.page, "commit"))
 		cgit_commit_link(name, title, class, ctx.qry.head,
 				 ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL,
-				 ctx.qry.path, 0);
+				 ctx.qry.path);
 	else if (!strcmp(ctx.qry.page, "patch"))
 		cgit_patch_link(name, title, class, ctx.qry.head,
 				ctx.qry.has_sha1 ? ctx.qry.sha1 : NULL,
@@ -503,7 +502,7 @@ void cgit_object_link(struct object *obj)
 	shortrev[10] = '\0';
 	if (obj->type == OBJ_COMMIT) {
 		cgit_commit_link(fmt("commit %s...", shortrev), NULL, NULL,
-				 ctx.qry.head, fullrev, NULL, 0);
+				 ctx.qry.head, fullrev, NULL);
 		return;
 	} else if (obj->type == OBJ_TREE)
 		page = "tree";
@@ -875,7 +874,7 @@ void cgit_print_pageheader(void)
 		cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head,
 			       ctx.qry.sha1, ctx.qry.vpath);
 		cgit_commit_link("commit", NULL, hc("commit"),
-				 ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath, 0);
+				 ctx.qry.head, ctx.qry.sha1, ctx.qry.vpath);
 		cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head,
 			       ctx.qry.sha1, ctx.qry.sha2, ctx.qry.vpath, 0);
 		if (ctx.repo->max_stats)