From d77cc7a6efd6ed09a42fcb04bc8cbf9f58c3ba89 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 12 Aug 2010 08:32:33 -0700 Subject: [PATCH] Added git-summary --- Makefile | 2 ++ Readme.md | 29 +++++++++++++++++++++++++++++ bin/git-summary | 13 +++++++++++++ 3 files changed, 44 insertions(+) create mode 100755 bin/git-summary diff --git a/Makefile b/Makefile index 14321c1..8176401 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ BINS = bin/git-count \ bin/git-delete-tag \ bin/git-repl \ bin/git-commits-since \ + bin/git-summary \ bin/git-release install: @@ -21,6 +22,7 @@ uninstall: rm -f $(PREFIX)/bin/git-commits-since rm -f $(PREFIX)/bin/git-delete-branch rm -f $(PREFIX)/bin/git-delete-tag + rm -f $(PREFIX)/bin/git-summary rm -f $(PREFIX)/bin/git-repl .PHONY: install uninstall \ No newline at end of file diff --git a/Readme.md b/Readme.md index 45f140e..5f168ac 100644 --- a/Readme.md +++ b/Readme.md @@ -9,6 +9,7 @@ ## Commands + - git summary - git changelog - git commits-since - git count @@ -18,6 +19,34 @@ - git release - git repl +## git-summary + +Outputs a repo summary: + + project: express + commits: 1893 + files : 111 + authors: + 1285 visionmedia + 478 Tj Holowaychuk + 48 Aaron Heckmann + 34 csausdev + 26 ciaranj + 6 Guillermo Rauch + 3 Nick Poulden + 2 Brian McKinney + 2 Benny Wong + 1 Justin Lilly + 1 James Herdman + 1 Adam Sanderson + 1 Viktor Kelemen + 1 Gregory Ritter + 1 Greg Ritter + 1 ewoudj + 1 isaacs + 1 Matt Colyer + + ## git-repl GIT read-eval-print-loop: diff --git a/bin/git-summary b/bin/git-summary new file mode 100755 index 0000000..64694fa --- /dev/null +++ b/bin/git-summary @@ -0,0 +1,13 @@ +#!/bin/sh + +project=${PWD##*/} +commit_count=`git log --oneline | wc -l | tr -d ' '` +file_count=`git ls-files | wc -l | tr -d ' '` +authors=`git shortlog -n -s` + +echo +echo " project: $project" +echo " commits: $commit_count" +echo " files : $file_count" +echo " authors: \n$authors" +echo \ No newline at end of file