diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2015-01-14 08:46:34 +0100 |
---|---|---|
committer | Alberto Bertogli <albertito@blitiri.com.ar> | 2015-01-17 14:11:43 +0100 |
commit | 89a637660fed90af8991d734ea758a07780e9ac1 (patch) | |
tree | 7d879d54f4866b4bc1cc04e622e64217b5dffc67 /views | |
parent | 37e731fc2ebe5d249ea9caa85e15491654450238 (diff) | |
download | git-arr-fork-89a637660fed90af8991d734ea758a07780e9ac1.zip |
branch: pass branch name 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/branch.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/views/branch.html b/views/branch.html index 0d3e891..0ca6834 100644 --- a/views/branch.html +++ b/views/branch.html @@ -3,9 +3,9 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> -% relroot = '../' * (len(repo.branch.split('/')) - 1) +% relroot = '../' * (len(branch.split('/')) - 1) -<title>git » {{repo.name}} » {{repo.branch}}</title> +<title>git » {{repo.name}} » {{branch}}</title> <link rel="stylesheet" type="text/css" href="{{relroot}}../../../../static/git-arr.css"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> </head> @@ -13,14 +13,14 @@ <body class="branch"> <h1><a href="{{relroot}}../../../../">git</a> » <a href="{{relroot}}../../">{{repo.name}}</a> » - <a href="./">{{repo.branch}}</a> + <a href="./">{{branch}}</a> </h1> <p> <a class="explicit" href="t/">Browse current source tree</a> </p> -% commits = repo.commits("refs/heads/" + repo.branch, +% commits = repo.commits("refs/heads/" + branch, % limit = repo.info.commits_per_page + 1, % offset = repo.info.commits_per_page * offset) % commits = list(commits) |