Browse Source

Merge 77b3d85cf61446dc42e731953d5f81154115cb2e into 55c5c285558c410bb35ebf421245d320ab9ee9fa

xuanskyer 6 years ago
parent
commit
ac69c57185
No account linked to committer's email
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      gitstats

+ 8
- 2
gitstats View File

47
 	'linear_linestats': 1,
47
 	'linear_linestats': 1,
48
 	'project_name': '',
48
 	'project_name': '',
49
 	'processes': 8,
49
 	'processes': 8,
50
-	'start_date': ''
50
+	'start_date': '',
51
+	'end_date': '',
51
 }
52
 }
52
 
53
 
53
 def getpipeoutput(cmds, quiet = False):
54
 def getpipeoutput(cmds, quiet = False):
74
 
75
 
75
 def getlogrange(defaultrange = 'HEAD', end_only = True):
76
 def getlogrange(defaultrange = 'HEAD', end_only = True):
76
 	commit_range = getcommitrange(defaultrange, end_only)
77
 	commit_range = getcommitrange(defaultrange, end_only)
78
+	datesel = ''
77
 	if len(conf['start_date']) > 0:
79
 	if len(conf['start_date']) > 0:
78
-		return '--since="%s" "%s"' % (conf['start_date'], commit_range)
80
+		datesel = '--since="%s" %s' % (conf['start_date'], datesel)
81
+	if len(conf['end_date']) > 0:
82
+		datesel = '--until="%s" %s' % (conf['end_date'], datesel)
83
+        if (len(datesel) > 0):
84
+		commit_range = '%s "%s"' % (datesel, commit_range)
79
 	return commit_range
85
 	return commit_range
80
 
86
 
81
 def getcommitrange(defaultrange = 'HEAD', end_only = False):
87
 def getcommitrange(defaultrange = 'HEAD', end_only = False):