aboutsummaryrefslogtreecommitdiff
path: root/git-arr
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2014-12-31 10:50:12 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-11 22:18:18 +0100
commit9ef78aaffd9ca5100659b8737cbd41523be330e2 (patch)
tree5f26219fd71da0c126cabf248c0f01a745733af9 /git-arr
parentd7604dab4dcd4c826828cb1abbed6eabdbcfa790 (diff)
downloadgit-arr-fork-9ef78aaffd9ca5100659b8737cbd41523be330e2.zip
git-arr: interpret 'max_pages = 0' as unlimited
By default, git-arr limits the number of pages of commits to 5, however, it is reasonable to expect that some projects will want all commits to be shown. Rather than forcing such projects to choose an arbitrarily large number as the value of 'max_pages', provide a formal mechanism to specify unlimited commit pages. 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, 2 insertions, 0 deletions
diff --git a/git-arr b/git-arr
index 6982b00..902bb89 100755
--- a/git-arr
+++ b/git-arr
@@ -105,6 +105,8 @@ def load_config(path):
r.info.commits_in_summary = config.getint(s, 'commits_in_summary')
r.info.commits_per_page = config.getint(s, 'commits_per_page')
r.info.max_pages = config.getint(s, 'max_pages')
+ if r.info.max_pages <= 0:
+ r.info.max_pages = sys.maxint
r.info.generate_tree = config.getboolean(s, 'tree')
r.info.web_url = config.get(s, 'web_url')