aboutsummaryrefslogtreecommitdiff
path: root/git-arr
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-01-14 08:46:34 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-17 14:11:43 +0100
commit89a637660fed90af8991d734ea758a07780e9ac1 (patch)
tree7d879d54f4866b4bc1cc04e622e64217b5dffc67 /git-arr
parent37e731fc2ebe5d249ea9caa85e15491654450238 (diff)
downloadgit-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 'git-arr')
-rwxr-xr-xgit-arr2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-arr b/git-arr
index 15dbf14..a6d6651 100755
--- a/git-arr
+++ b/git-arr
@@ -263,7 +263,7 @@ def tree(repo, bname, dirname = ''):
@bottle.view('branch')
@with_utils
def branch(repo, bname, offset = 0):
- return dict(repo = repo.new_in_branch(bname), offset = offset)
+ return dict(repo = repo, branch = bname, offset = offset)
@bottle.route('/static/<path:path>')
def static(path):