Merge pull request #107 from muhtasib/summary_repo_age

Added repo age to git-summary.
This commit is contained in:
TJ Holowaychuk 2012-06-11 10:53:05 -07:00
commit e04e8b4cf8

View file

@ -54,15 +54,24 @@ authors() {
'
}
#
# fetch repository age from oldest commit
#
repository_age() {
git log --reverse --pretty=oneline --format="%cd (%cr)" | head -n 1
}
# summary
echo
echo " project: $project"
echo " commits:" $(commit_count)
echo " active :" $(active_days) days
echo " project : $project"
echo " repo age:" $(repository_age)
echo " commits :" $(commit_count)
echo " active :" $(active_days) days
if test "$commit" = ""; then
echo " files :" $(file_count)
echo " files :" $(file_count)
fi
echo " authors: "
echo " authors : "
authors
echo