Compare commits

...

6 Commits
1.0.6 ... 1.0.7

Author SHA1 Message Date
Lukas Mestan
10353cbeff respecting .mailmap, refs #33 2017-09-04 11:23:16 +02:00
Lukáš Mešťan
0f68ba1588 fix define function 2017-07-28 09:42:33 +02:00
Lukáš Mešťan
a985e4decf Merge pull request #32 from arzzen/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2017-06-16 08:24:05 +02:00
Lukáš Mešťan
6b33554bea Create CODE_OF_CONDUCT.md 2017-06-16 08:22:00 +02:00
Lukáš Mešťan
a6aed25d4b citations 2017-06-07 10:28:08 +02:00
Lukáš Mešťan
9418613d42 fix #30
update readme
2017-05-08 12:15:08 +02:00
3 changed files with 62 additions and 9 deletions

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lukas.mestan@googlemail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -6,6 +6,8 @@
> `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 dont think there is a single person alive who knows them all. Probably not even [Linus Torvalds](https://github.com/torvalds) himself :).
## Table of Contents
[**Screenshots**](#screenshots)
@@ -22,6 +24,7 @@
* [**Tests**](#tests)
[**System requirements**](#system-requirements)
* [**Dependences**](#dependences)
[**Contribution**](#contribution)
@@ -125,6 +128,10 @@ brew install git-quick-stats
* Unix like OS with a proper shell
* Tools we use: git ; awk ; sed ; tr ; echo ; grep ; cut ; sort ; head ; uniq ; column.
#### Dependences
* [`bsdmainutils`](https://packages.debian.org/sid/bsdmainutils) `apt install bsdmainutils`
## Contribution
Want to contribute? Great! First, read this page.

View File

@@ -25,7 +25,7 @@ else
_limit=10
fi
show_menu() {
function show_menu() {
NORMAL=`echo "\033[m"`
MENU=`echo "\033[36m"`
NUMBER=`echo "\033[33m"`
@@ -67,7 +67,7 @@ function option_picked() {
function detailedGitStats() {
option_picked "Contribution stats (by author):"
git log --no-merges --numstat --pretty="format:commit %H%nAuthor: %an <%ae>%nDate: %ad%n%n%w(0,4,4)%B%n" $_since $_until $_pathspec | LC_ALL=C awk '
git log --use-mailmap --no-merges --numstat --pretty="format:commit %H%nAuthor: %aN <%ae>%nDate: %ad%n%n%w(0,4,4)%B%n" $_since $_until $_pathspec | LC_ALL=C awk '
function printStats(author) {
printf "\t%s:\n", author
@@ -130,7 +130,7 @@ function detailedGitStats() {
function suggestReviewers() {
option_picked "Suggested code reviewers (based on git history):"
git log --no-merges $_since $_until --pretty=%an $_pathspec $* | head -n 100 | sort | uniq -c | sort -nr | LC_ALL=C awk '
git log --use-mailmap --no-merges $_since $_until --pretty=%aN $_pathspec $* | head -n 100 | sort | uniq -c | sort -nr | LC_ALL=C awk '
{ args[NR] = $0; }
END {
for (i = 1; i <= NR; ++i) {
@@ -223,7 +223,7 @@ function commitsByHour() {
function commitsPerDay() {
option_picked "Git commits per date:";
git log --no-merges $_since $_until --date=short --format='%ad' $_pathspec | sort | uniq -c
git log --use-mailmap --no-merges $_since $_until --date=short --format='%ad' $_pathspec | sort | uniq -c
}
function commitsPerAuthor() {
@@ -247,17 +247,17 @@ function myDailyStats() {
}
}'
echo -e "\t" $(git log --author="$(git config user.name)" --no-merges --since=$(date "+%Y-%m-%dT00:00:00") --until=$(date "+%Y-%m-%dT23:59:59") --reverse | grep commit | wc -l) "commits"
echo -e "\t" $(git log --use-mailmap --author="$(git config user.name)" --no-merges --since=$(date "+%Y-%m-%dT00:00:00") --until=$(date "+%Y-%m-%dT23:59:59") --reverse | grep commit | wc -l) "commits"
}
function contributors() {
option_picked "All contributors (sorted by name):"
git log --no-merges $_since $_until --format='%aN' $_pathspec | sort -u | cat -n
git log --use-mailmap --no-merges $_since $_until --format='%aN' $_pathspec | sort -u | cat -n
}
function branchTree() {
option_picked "Branching tree view:"
git log --graph --abbrev-commit $_since $_until --decorate --format=format:'--+ Commit: %h %n | Date: %aD (%ar) %n'' | Message: %s %d %n'' + Author: %an %n' --all | head -n $((_limit*5))
git log --use-mailmap --graph --abbrev-commit $_since $_until --decorate --format=format:'--+ Commit: %h %n | Date: %aD (%ar) %n'' | Message: %s %d %n'' + Author: %aN %n' --all | head -n $((_limit*5))
}
@@ -277,10 +277,10 @@ function changelogs() {
fi
NEXT=$(date +%F)
git log --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 --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
}