mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
19 lines
393 B
Bash
Executable file
19 lines
393 B
Bash
Executable file
#!/bin/sh
|
|
|
|
COMMITISH=""
|
|
test $# -ne 0 && COMMITISH=$@
|
|
project=${PWD##*/}
|
|
commit_count=`git log --oneline $COMMITISH | wc -l | tr -d ' '`
|
|
file_count=`git ls-files | wc -l | tr -d ' '`
|
|
authors=`git shortlog -n -s $COMMITISH`
|
|
|
|
echo
|
|
echo " project: $project"
|
|
echo " commits: $commit_count"
|
|
if test "$COMMITISH" = ""; then
|
|
echo " files : $file_count"
|
|
fi
|
|
echo " authors: "
|
|
echo "$authors"
|
|
echo
|