From 37e731fc2ebe5d249ea9caa85e15491654450238 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Wed, 14 Jan 2015 02:46:33 -0500 Subject: blob: pass branch name to view explicitly Passing the branch name into the view indirectly via Repo.new_in_branch() increases cognitive burden, thus outweighing whatever minor convenience (if any) is gained by doing so. The code is easier to reason about when the branch name is passed to the view directly. Signed-off-by: Eric Sunshine Signed-off-by: Alberto Bertogli --- views/blob.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'views/blob.html') diff --git a/views/blob.html b/views/blob.html index ef20328..c937b37 100644 --- a/views/blob.html +++ b/views/blob.html @@ -8,10 +8,10 @@ % else: % reltree = '../' * (len(dirname.split('/')) - 1) % end -% relroot = reltree + '../' * (len(repo.branch.split('/')) - 1) +% relroot = reltree + '../' * (len(branch.split('/')) - 1) git » {{repo.name}} » - {{repo.branch}} » {{dirname.unicode}}/{{fname.unicode}} + {{branch}} » {{dirname.unicode}}/{{fname.unicode}}

git » {{repo.name}} » - {{repo.branch}} » + {{branch}} » tree

- [{{repo.branch}}] / + [{{branch}}] / % base = smstr(reltree) % for c in dirname.split('/'): % if not c.raw: -- cgit v1.2.3