From 0fd5e20140766634b2c24fbb78f848336059fd1a Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Sat, 22 Nov 2008 10:10:29 +0200 Subject: [PATCH] s/git-/git /. --- gitstats | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gitstats b/gitstats index c0a8f62..a6bbfff 100755 --- a/gitstats +++ b/gitstats @@ -137,7 +137,7 @@ class GitDataCollector(DataCollector): DataCollector.collect(self, dir) try: - self.total_authors = int(getpipeoutput(['git-log', 'git-shortlog -s', 'wc -l'])) + self.total_authors = int(getpipeoutput(['git log', 'git shortlog -s', 'wc -l'])) except: self.total_authors = 0 #self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l')) @@ -159,14 +159,14 @@ class GitDataCollector(DataCollector): # tags self.tags = {} - lines = getpipeoutput(['git-show-ref --tags']).split('\n') + lines = getpipeoutput(['git show-ref --tags']).split('\n') for line in lines: if len(line) == 0: continue (hash, tag) = line.split(' ') tag = tag.replace('refs/tags/', '') - output = getpipeoutput(['git-log "%s" --pretty=format:"%%at %%an" -n 1' % hash]) + output = getpipeoutput(['git log "%s" --pretty=format:"%%at %%an" -n 1' % hash]) if len(output) > 0: parts = output.split(' ') stamp = 0 @@ -178,7 +178,7 @@ class GitDataCollector(DataCollector): # Collect revision statistics # Outputs " " - lines = getpipeoutput(['git-rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n') + lines = getpipeoutput(['git rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n') for line in lines: # linux-2.6 says "" for one line O_o parts = line.split(' ') @@ -270,7 +270,7 @@ class GitDataCollector(DataCollector): # TODO Optimize this, it's the worst bottleneck # outputs " " for each revision self.files_by_stamp = {} # stamp -> files - revlines = getpipeoutput(['git-rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n') + revlines = getpipeoutput(['git rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n') lines = [] for revline in revlines: time, rev = revline.split(' ') @@ -291,7 +291,7 @@ class GitDataCollector(DataCollector): # extensions self.extensions = {} # extension -> files, lines - lines = getpipeoutput(['git-ls-files']).split('\n') + lines = getpipeoutput(['git ls-files']).split('\n') self.total_files = len(lines) for line in lines: base = os.path.basename(line) @@ -315,7 +315,7 @@ class GitDataCollector(DataCollector): # N files changed, N insertions (+), N deletions(-) # self.changes_by_date = {} # stamp -> { files, ins, del } - lines = getpipeoutput(['git-log --shortstat --pretty=format:"%at %an"']).split('\n') + lines = getpipeoutput(['git log --shortstat --pretty=format:"%at %an"']).split('\n') lines.reverse() files = 0; inserted = 0; deleted = 0; total_lines = 0 for line in lines: @@ -379,7 +379,7 @@ class GitDataCollector(DataCollector): try: res = self.cache['files_in_tree'][rev] except: - res = int(getpipeoutput(['git-ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0]) + res = int(getpipeoutput(['git ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0]) if 'files_in_tree' not in self.cache: self.cache['files_in_tree'] = {} self.cache['files_in_tree'][rev] = res @@ -393,7 +393,7 @@ class GitDataCollector(DataCollector): return datetime.datetime.fromtimestamp(self.last_commit_stamp) def getTags(self): - lines = getpipeoutput(['git-show-ref --tags', 'cut -d/ -f3']) + lines = getpipeoutput(['git show-ref --tags', 'cut -d/ -f3']) return lines.split('\n') def getTagDate(self, tag): @@ -412,7 +412,7 @@ class GitDataCollector(DataCollector): return self.total_lines def revToDate(self, rev): - stamp = int(getpipeoutput(['git-log --pretty=format:%%at "%s" -n 1' % rev])) + stamp = int(getpipeoutput(['git log --pretty=format:%%at "%s" -n 1' % rev])) return datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d') class ReportCreator: -- 2.11.4.GIT