Added git-summary

This commit is contained in:
Tj Holowaychuk 2010-08-12 08:32:33 -07:00
parent 0a84ea1688
commit d77cc7a6ef
3 changed files with 44 additions and 0 deletions

View file

@ -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

View file

@ -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:

13
bin/git-summary Executable file
View file

@ -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