mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
The git log is now read in reverse order.
This makes sure that the most recent email of an author is always used when generating the gravatar. It also makes sure that the mappings between author<->email are correct (and recent).
This commit is contained in:
parent
e902f7b82d
commit
0447da1933
1 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
# coding: utf-8
|
||||
#
|
||||
# Copyright © 2012-2013 Ejwa Software. All rights reserved.
|
||||
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
|
||||
#
|
||||
# This file is part of gitinspector.
|
||||
#
|
||||
|
@ -106,7 +106,7 @@ class Changes:
|
|||
|
||||
def __init__(self, hard):
|
||||
self.commits = []
|
||||
git_log_r = subprocess.Popen("git log --pretty=\"%cd|%H|%aN|%aE\" --stat=100000,8192 --no-merges -w " +
|
||||
git_log_r = subprocess.Popen("git log --reverse --pretty=\"%cd|%H|%aN|%aE\" --stat=100000,8192 --no-merges -w " +
|
||||
interval.get_since() + interval.get_until() +
|
||||
"{0} --date=short".format("-C -C -M" if hard else ""),
|
||||
shell=True, bufsize=1, stdout=subprocess.PIPE).stdout
|
||||
|
@ -144,10 +144,10 @@ class Changes:
|
|||
interval.set_ref(self.commits[0].sha)
|
||||
|
||||
if len(self.commits) > 0:
|
||||
self.first_commit_date = datetime.date(int(self.commits[-1].date[0:4]), int(self.commits[-1].date[5:7]),
|
||||
int(self.commits[-1].date[8:10]))
|
||||
self.last_commit_date = datetime.date(int(self.commits[0].date[0:4]), int(self.commits[0].date[5:7]),
|
||||
self.first_commit_date = datetime.date(int(self.commits[0].date[0:4]), int(self.commits[0].date[5:7]),
|
||||
int(self.commits[0].date[8:10]))
|
||||
self.last_commit_date = datetime.date(int(self.commits[-1].date[0:4]), int(self.commits[-1].date[5:7]),
|
||||
int(self.commits[-1].date[8:10]))
|
||||
|
||||
def get_commits(self):
|
||||
return self.commits
|
||||
|
|
Loading…
Reference in a new issue