Kaynağa Gözat

s/git-/git /.

Heikki Hokkanen 17 yıl önce
ebeveyn
işleme
0fd5e20140
1 değiştirilmiş dosya ile 10 ekleme ve 10 silme
  1. 10
    10
      gitstats

+ 10
- 10
gitstats Dosyayı Görüntüle

@@ -137,7 +137,7 @@ class GitDataCollector(DataCollector):
137 137
 		DataCollector.collect(self, dir)
138 138
 
139 139
 		try:
140
-			self.total_authors = int(getpipeoutput(['git-log', 'git-shortlog -s', 'wc -l']))
140
+			self.total_authors = int(getpipeoutput(['git log', 'git shortlog -s', 'wc -l']))
141 141
 		except:
142 142
 			self.total_authors = 0
143 143
 		#self.total_lines = int(getoutput('git-ls-files -z |xargs -0 cat |wc -l'))
@@ -159,14 +159,14 @@ class GitDataCollector(DataCollector):
159 159
 
160 160
 		# tags
161 161
 		self.tags = {}
162
-		lines = getpipeoutput(['git-show-ref --tags']).split('\n')
162
+		lines = getpipeoutput(['git show-ref --tags']).split('\n')
163 163
 		for line in lines:
164 164
 			if len(line) == 0:
165 165
 				continue
166 166
 			(hash, tag) = line.split(' ')
167 167
 
168 168
 			tag = tag.replace('refs/tags/', '')
169
-			output = getpipeoutput(['git-log "%s" --pretty=format:"%%at %%an" -n 1' % hash])
169
+			output = getpipeoutput(['git log "%s" --pretty=format:"%%at %%an" -n 1' % hash])
170 170
 			if len(output) > 0:
171 171
 				parts = output.split(' ')
172 172
 				stamp = 0
@@ -178,7 +178,7 @@ class GitDataCollector(DataCollector):
178 178
 
179 179
 		# Collect revision statistics
180 180
 		# Outputs "<stamp> <author>"
181
-		lines = getpipeoutput(['git-rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n')
181
+		lines = getpipeoutput(['git rev-list --pretty=format:"%at %an" HEAD', 'grep -v ^commit']).split('\n')
182 182
 		for line in lines:
183 183
 			# linux-2.6 says "<unknown>" for one line O_o
184 184
 			parts = line.split(' ')
@@ -270,7 +270,7 @@ class GitDataCollector(DataCollector):
270 270
 		# TODO Optimize this, it's the worst bottleneck
271 271
 		# outputs "<stamp> <files>" for each revision
272 272
 		self.files_by_stamp = {} # stamp -> files
273
-		revlines = getpipeoutput(['git-rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n')
273
+		revlines = getpipeoutput(['git rev-list --pretty=format:"%at %T" HEAD', 'grep -v ^commit']).strip().split('\n')
274 274
 		lines = []
275 275
 		for revline in revlines:
276 276
 			time, rev = revline.split(' ')
@@ -291,7 +291,7 @@ class GitDataCollector(DataCollector):
291 291
 
292 292
 		# extensions
293 293
 		self.extensions = {} # extension -> files, lines
294
-		lines = getpipeoutput(['git-ls-files']).split('\n')
294
+		lines = getpipeoutput(['git ls-files']).split('\n')
295 295
 		self.total_files = len(lines)
296 296
 		for line in lines:
297 297
 			base = os.path.basename(line)
@@ -315,7 +315,7 @@ class GitDataCollector(DataCollector):
315 315
 		#  N files changed, N insertions (+), N deletions(-)
316 316
 		# <stamp> <author>
317 317
 		self.changes_by_date = {} # stamp -> { files, ins, del }
318
-		lines = getpipeoutput(['git-log --shortstat --pretty=format:"%at %an"']).split('\n')
318
+		lines = getpipeoutput(['git log --shortstat --pretty=format:"%at %an"']).split('\n')
319 319
 		lines.reverse()
320 320
 		files = 0; inserted = 0; deleted = 0; total_lines = 0
321 321
 		for line in lines:
@@ -379,7 +379,7 @@ class GitDataCollector(DataCollector):
379 379
 		try:
380 380
 			res = self.cache['files_in_tree'][rev]
381 381
 		except:
382
-			res = int(getpipeoutput(['git-ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0])
382
+			res = int(getpipeoutput(['git ls-tree -r --name-only "%s"' % rev, 'wc -l']).split('\n')[0])
383 383
 			if 'files_in_tree' not in self.cache:
384 384
 				self.cache['files_in_tree'] = {}
385 385
 			self.cache['files_in_tree'][rev] = res
@@ -393,7 +393,7 @@ class GitDataCollector(DataCollector):
393 393
 		return datetime.datetime.fromtimestamp(self.last_commit_stamp)
394 394
 	
395 395
 	def getTags(self):
396
-		lines = getpipeoutput(['git-show-ref --tags', 'cut -d/ -f3'])
396
+		lines = getpipeoutput(['git show-ref --tags', 'cut -d/ -f3'])
397 397
 		return lines.split('\n')
398 398
 	
399 399
 	def getTagDate(self, tag):
@@ -412,7 +412,7 @@ class GitDataCollector(DataCollector):
412 412
 		return self.total_lines
413 413
 	
414 414
 	def revToDate(self, rev):
415
-		stamp = int(getpipeoutput(['git-log --pretty=format:%%at "%s" -n 1' % rev]))
415
+		stamp = int(getpipeoutput(['git log --pretty=format:%%at "%s" -n 1' % rev]))
416 416
 		return datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d')
417 417
 
418 418
 class ReportCreator: