Luke Ross

Colorado

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

Web-based git repository viewer.

Commit 30ff0260e76e9a666c5bb0012ec696cfb7c025f7

turns out renaming was a bit squiffy

Committed 23 Oct 2018 by Luke Ross

colorado/views.py

@@ -303,7 +303,10 @@ def diff_view(slug, id):
 			ele.findmeld("file-from").content(diff.a_path)
 			ele.findmeld("file-to").content(diff.b_path)
 			if not diff.diff:
-				message = "File removed"
+				if diff.b_path:
+					message = "File renamed"
+				else:
+					message = "File removed"
 		else:
 			ele.findmeld("file-change").deparent()
 			ele.findmeld("file-to").content(diff.b_path)
@@ -500,7 +503,7 @@ def tree_base_view(slug, type, id, repo, commit, tree, show_download=False, feed
 	for current in chain([commit], commit.iter_parents()):
 		commit_count += 1
 		for diff in get_parent_diff(repo.repo, current):
-			if diff.change_type not in "AM":
+			if diff.change_type not in "AM" and not diff.change_type.startswith("R"):
 				continue
 			if diff.b_path in by_file:
 				if by_file[diff.b_path].committed_date < current.committed_date: