From ed24416bf7015be034edc495f21e98b59febcb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Scoubeau?= Date: Mon, 17 Jun 2013 12:56:39 +0200 Subject: [PATCH] Make repository_age() "history rewrite safe" Change commit date to author date, so that the repo age doesn't change if history rewriting tools (such as amend, rebase, filter-branch) are used. --- bin/git-summary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-summary b/bin/git-summary index cd62552..198aa03 100755 --- a/bin/git-summary +++ b/bin/git-summary @@ -59,7 +59,7 @@ authors() { # repository_age() { - git log --reverse --pretty=oneline --format="%cr" | head -n 1 | sed 's/ago//' + git log --reverse --pretty=oneline --format="%ar" | head -n 1 | sed 's/ago//' } # summary