aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-01-14 08:46:33 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-17 14:11:39 +0100
commit37e731fc2ebe5d249ea9caa85e15491654450238 (patch)
tree1426065dfd53cf26169eb9ad695ebbcae1e45d91 /views
parente6099cf2729fc446f7cba2dab5da2d6b0646b567 (diff)
downloadgit-arr-fork-37e731fc2ebe5d249ea9caa85e15491654450238.zip
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 <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'views')
-rw-r--r--views/blob.html8
1 files changed, 4 insertions, 4 deletions
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)
<title>git &raquo; {{repo.name}} &raquo;
- {{repo.branch}} &raquo; {{dirname.unicode}}/{{fname.unicode}}</title>
+ {{branch}} &raquo; {{dirname.unicode}}/{{fname.unicode}}</title>
<link rel="stylesheet" type="text/css"
href="{{relroot}}../../../../../static/git-arr.css"/>
<link rel="stylesheet" type="text/css"
@@ -22,12 +22,12 @@
<body class="tree">
<h1><a href="{{relroot}}../../../../../">git</a> &raquo;
<a href="{{relroot}}../../../">{{repo.name}}</a> &raquo;
- <a href="{{reltree}}../">{{repo.branch}}</a> &raquo;
+ <a href="{{reltree}}../">{{branch}}</a> &raquo;
<a href="{{reltree}}">tree</a>
</h1>
<h3>
- <a href="{{reltree}}">[{{repo.branch}}]</a> /
+ <a href="{{reltree}}">[{{branch}}]</a> /
% base = smstr(reltree)
% for c in dirname.split('/'):
% if not c.raw: