diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 15:46:53 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 15:46:53 +0300 |
commit | ddbb89fc586aeb83e47c711a85ae963b2e392c3b (patch) | |
tree | 03e4c5a9cd4d8f2d91d3c403dd7ced0d28217756 | |
parent | Makefile: add alias for launching Python (diff) | |
download | cgitize-ddbb89fc586aeb83e47c711a85ae963b2e392c3b.tar.gz cgitize-ddbb89fc586aeb83e47c711a85ae963b2e392c3b.zip |
age file: sort by committer date, not author date
-rw-r--r-- | cgitize/cgit.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |