From 8c0032c63b64cc6420bccf87ad4bd39bc3aad209 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Sat, 8 Jan 2011 11:03:51 +0200 Subject: [PATCH] Make project name configurable (-c project_name=foo). --- gitstats | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gitstats b/gitstats index cb51811..7675f58 100755 --- a/gitstats +++ b/gitstats @@ -37,6 +37,7 @@ conf = { 'commit_begin': '', 'commit_end': '', 'linear_linestats': 1, + 'project_name': '', } def getpipeoutput(cmds, quiet = False): @@ -90,7 +91,10 @@ class DataCollector: # This should be the main function to extract data from the repository. def collect(self, dir): self.dir = dir - self.projectname = os.path.basename(os.path.abspath(dir)) + if len(conf['project_name']) == 0: + self.projectname = os.path.basename(os.path.abspath(dir)) + else: + self.projectname = conf['project_name'] ## # Load cacheable data -- 2.11.4.GIT