##// END OF EJS Templates
git: use rev-list for fetching last commit data inc ase of single commit. It's faster that using git log
marcink -
r3459:57dba41e default
parent child Browse files
Show More
@@ -309,6 +309,10 b' class GitCommit(base.BaseCommit):'
309 self._get_filectx(path)
309 self._get_filectx(path)
310 f_path = safe_str(path)
310 f_path = safe_str(path)
311
311
312 # optimize for n==1, rev-list is much faster for that use-case
313 if limit == 1:
314 cmd = ['rev-list', '-1', self.raw_id, '--', f_path]
315 else:
312 cmd = ['log']
316 cmd = ['log']
313 if limit:
317 if limit:
314 cmd.extend(['-n', str(safe_int(limit, 0))])
318 cmd.extend(['-n', str(safe_int(limit, 0))])
General Comments 0
You need to be logged in to leave comments. Login now