mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Fix commit and file count in git-summary with a commitish
This commit is contained in:
parent
0bc7afe27e
commit
843fc7ad11
|
|
@ -3,14 +3,16 @@
|
|||
COMMITISH=""
|
||||
test $# -ne 0 && COMMITISH=$@
|
||||
project=${PWD##*/}
|
||||
commit_count=`git log --oneline | wc -l | tr -d ' '`
|
||||
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"
|
||||
echo " files : $file_count"
|
||||
if test "$COMMITISH" = ""; then
|
||||
echo " files : $file_count"
|
||||
fi
|
||||
echo " authors: "
|
||||
echo "$authors"
|
||||
echo
|
||||
|
|
|
|||
Loading…
Reference in a new issue