From 5b6a3cfc2c580005208172498e6e9dafbf1f155b Mon Sep 17 00:00:00 2001 From: Jochen Kupperschmidt Date: Sun, 5 Jun 2016 23:48:56 +0200 Subject: [PATCH] Finding the highest daily commit count once is sufficient. --- gitfiti.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gitfiti.py b/gitfiti.py index d0ef78ae8..08030f84b 100755 --- a/gitfiti.py +++ b/gitfiti.py @@ -328,7 +328,9 @@ def main(): cal = get_calendar(username, git_base) - m = calculate_multiplier(find_max_commits(cal)) + max_commits = find_max_commits(cal) + + m = calculate_multiplier(max_commits) print('Enter name of the repo to be used by gitfiti:') repo = request_user_input() @@ -347,7 +349,7 @@ def main(): 'Enter the word "gitfiti" to exceed your max\n' '(this option generates WAY more commits)\n' 'Any other input will cause the default matching behavior' - ).format(find_max_commits(cal))) + ).format(max_commits)) match = request_user_input() match = m if (match == 'gitfiti') else 1