Luke Ross

Colorado

4 releases git clone https://lukeross.name/projects/colorado.git/

Web-based git repository viewer.

Commit 6a6ea693445c28901b69919fd33bac03283fdc2b

strip whitespace from messages

Committed 16 Oct 2018 by Luke Ross

colorado/views.py

@@ -353,7 +353,7 @@ def history_view(slug, type, id):
 			))
 		ele.set("id", "rev-" + c.hexsha)
 		ele.findmeld("rev-desc").content(c.message.splitlines()[0])
-		ele.findmeld("rev-desc").set("title", c.message)
+		ele.findmeld("rev-desc").set("title", c.message.strip())
 		ele.findmeld("rev-desc").set("href", url_for(
 			".diff_view", slug=slug, id=c.hexsha
 		))
@@ -535,7 +535,7 @@ def tree_base_view(slug, type, id, repo, commit, tree, show_download=False):
 				))
 				ele.findmeld("file-revdesc").set(
 					"title",
-					"{}\n{}".format(file_commit.hexsha, file_commit.message)
+					"{}\n{}".format(file_commit.hexsha, file_commit.message.strip())
 				)
 				ele.findmeld("file-when").content(
 					arrow.get(file_commit.committed_datetime).humanize()
@@ -643,7 +643,7 @@ def trees_view(slug):
 		))
 		ele.findmeld("branch-revdesc").set(
 			"title",
-			"{}\n{}".format(thing.commit.hexsha, thing.commit.message)
+			"{}\n{}".format(thing.commit.hexsha, thing.commit.message.strip())
 		)
 		ele.findmeld("branch-when").content(
 			arrow.get(thing.commit.committed_datetime).humanize()