From ddbb89fc586aeb83e47c711a85ae963b2e392c3b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Dec 2021 15:46:53 +0300 Subject: age file: sort by committer date, not author date --- cgitize/cgit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cgitize/cgit.py b/cgitize/cgit.py index 3dce468..769690b 100644 --- a/cgitize/cgit.py +++ b/cgitize/cgit.py @@ -67,8 +67,10 @@ class AgeFile: @staticmethod def get_age(repo_dir): # https://git.zx2c4.com/cgit/tree/contrib/hooks/post-receive.agefile + # Except I think that the committer date, not author date better + # represents activity. with chdir(repo_dir): - success, output = Git.capture('for-each-ref', '--sort=-authordate', '--count=1', '--format=%(authordate:iso8601)') + success, output = Git.capture('for-each-ref', '--sort=-committerdate', '--count=1', '--format=%(committerdate:iso8601)') if not success: logging.error("Couldn't get the timestamp of the newest commit in repository: %s", repo_dir) return None -- cgit v1.2.3