mirror of
https://github.com/git-quick-stats/git-quick-stats.git
synced 2025-12-16 12:00:12 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bfc58710a | ||
|
|
6f931ac9b5 | ||
|
|
42a657b0de | ||
|
|
a48347e0df | ||
|
|
f4930f152d | ||
|
|
e5727cf4e9 | ||
|
|
6b54e9d8df | ||
|
|
7f70c8b728 | ||
|
|
dc86f8b6ae | ||
|
|
36967bc6f4 | ||
|
|
cdfa6bf467 | ||
|
|
a496390884 | ||
|
|
e81d3ab9f4 | ||
|
|
b0e62d64c7 | ||
|
|
01b6e17007 |
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Lukáš Mešťan
|
||||
Copyright (c) 2018 Lukáš Mešťan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
5
Makefile
5
Makefile
@@ -1,4 +1,4 @@
|
||||
PREFIX=/usr/local
|
||||
PREFIX ?= /usr/local
|
||||
TASK_DONE = echo -e "\n✓ $@ done\n"
|
||||
# files that need mode 755
|
||||
EXEC_FILES=git-quick-stats
|
||||
@@ -16,7 +16,8 @@ help:
|
||||
@$(TASK_DONE)
|
||||
|
||||
install:
|
||||
install -m 0755 $(EXEC_FILES) $(PREFIX)/bin
|
||||
mkdir -p $(PREFIX)/bin
|
||||
install -m 0755 $(EXEC_FILES) $(PREFIX)/bin/$(EXEC_FILES)
|
||||
git config --global alias.quick-stats '! $(PREFIX)/bin/$(EXEC_FILES)'
|
||||
@$(TASK_DONE)
|
||||
|
||||
|
||||
14
README.md
14
README.md
@@ -1,5 +1,5 @@
|
||||
|
||||
## GIT quick statistics
|
||||
## GIT quick statistics [](https://twitter.com/intent/tweet?text=Simple%20and%20efficient%20way%20to%20access%20various%20statistics%20in%20git%20repository&url=https://github.com/arzzen/git-quick-stat&via=arzzen&hashtags=git,stats,tool,statistics,developers)
|
||||
|
||||
[](https://travis-ci.org/arzzen/git-quick-stats)
|
||||
[](http://braumeister.org/formula/git-quick-stats)
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
> `git quick-stats` is a simple and efficient way to access various statistics in git repository.
|
||||
|
||||
> Any git repository contains a tonne of information about commits, contributors, and files. Extracting this information is not always trivial, mostly because of a gadzillion options to a gadzillion git commands – I don’t think there is a single person alive who knows them all. Probably not even [Linus Torvalds](https://github.com/torvalds) himself :).
|
||||
> Any git repository contains tons of information about commits, contributors, and files. Extracting this information is not always trivial, mostly because of a gadzillion options to a gadzillion git commands – I don’t think there is a single person alive who knows them all. Probably not even [Linus Torvalds](https://github.com/torvalds) himself :).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* [**Windows**](#windows-cygwin)
|
||||
|
||||
[**Usage**](#usage)
|
||||
* [**Git log since/unitl**](#git-log-since-until)
|
||||
* [**Git log since/until**](#git-log-since-until)
|
||||
* [**Git log limit**](#git-log-limit)
|
||||
* [**Git pathspec**](#git-pathspec)
|
||||
* [**Tests**](#tests)
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
[**Contribution**](#contribution)
|
||||
|
||||
[**FAQ**](#faq)
|
||||
|
||||
[**License**](#licensing)
|
||||
|
||||
|
||||
@@ -133,6 +135,12 @@ brew install git-quick-stats
|
||||
|
||||
* [`bsdmainutils`](https://packages.debian.org/sid/bsdmainutils) `apt install bsdmainutils`
|
||||
|
||||
## FAQ
|
||||
|
||||
*Q:* I get some errors after run git-quick-stats in cygwin like `/usr/local/bin/git-quick-stats: line 2: $'\r': command not found`
|
||||
|
||||
*A:* You can run dos2unix app in cygwin `/bin/dos2unix.exe /usr/local/bin/git-quick-stats`. This will convert it to Unix format and you then should be able to run it.
|
||||
|
||||
## Contribution
|
||||
|
||||
Want to contribute? Great! First, read this page.
|
||||
|
||||
@@ -97,7 +97,8 @@ function detailedGitStats() {
|
||||
}
|
||||
|
||||
/^Author:/ {
|
||||
author = $2 " " $3
|
||||
$1 = ""
|
||||
author = $0
|
||||
commits[author] += 1
|
||||
commits["total"] += 1
|
||||
}
|
||||
@@ -204,7 +205,7 @@ function commitsByHour() {
|
||||
for i in `seq -w 0 23`
|
||||
do
|
||||
echo -ne "\t$i\t"
|
||||
echo $(git shortlog -n --no-merges --format='%ad %s' $_author $_since $_until | grep " $i:" | wc -l)
|
||||
echo "$(git shortlog -n --no-merges --format='%ad %s' $_author $_since $_until | grep ' '$i: | wc -l)"
|
||||
done | awk '{
|
||||
count[$1] = $2
|
||||
total += $2
|
||||
@@ -277,10 +278,10 @@ function changelogs() {
|
||||
fi
|
||||
|
||||
NEXT=$(date +%F)
|
||||
git log --use-mailmap --no-merges --format="%cd" --date=short $_author $_since $_until $_pathspec | sort -u -r | head -n $_limit | while read DATE ; do
|
||||
git log --use-mailmap --no-merges --format="%cd" --date=short "$_author" $_since $_until $_pathspec | sort -u -r | head -n $_limit | while read DATE ; do
|
||||
echo
|
||||
echo "[$DATE]"
|
||||
GIT_PAGER=cat git log --use-mailmap --no-merges --format=" * %s (%aN)" $_author --since=$DATE --until=$NEXT
|
||||
GIT_PAGER=cat git log --use-mailmap --no-merges --format=" * %s (%aN)" "$_author" --since=$DATE --until=$NEXT
|
||||
NEXT=$DATE
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user